mesonbuild/meson

Meson needs native understanding of symbol version scripts

開放

#3,047 建立於 2018年2月12日

 (29 則留言) (16 個反應) (0 位負責人)Python (1,465 個分叉)batch import
compilersenhancementhelp wanted

倉庫指標

星標
 (4,978 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Meson doesn't seem to understand much about linkers; most of the projects porting to meson do something like this:

mapfile = 'libgusb.ver'
vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
gusb = shared_library(
  'gusb',
  sources : [
    'gusb-context.c',
  ],
  soversion : lt_current,
  version : lt_version,
  dependencies : [
    libusb,
  ],
  link_args : vflag,
  link_depends : mapfile,
  install : true
)

Which is fine, unless you discover that OS-X doesn't support --version-script : https://github.com/hughsie/libgusb/issues/11

Rather than have to do evil things to the meson.build file to support OS-X, I would much prefer fr meson to know what a version-script is, rather than just dumping it in a command line. In the case of OS-X the version script could just be ignored. Ideas welcome, thanks!

貢獻者指南