mesonbuild/meson

Meson needs native understanding of symbol version scripts

オープン

#3,047 opened on 2018/02/12

 (29 件のコメント) (16 件のリアクション) (0 人の担当者)Python (1,465 件のフォーク)batch import
compilersenhancementhelp wanted

Repository metrics

Stars
 (4,978 個のスター)
PR merge metrics
 (平均マージ 139d 13h) (30d で 51 merged PRs)

説明

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!

コントリビューターガイド