mesonbuild/meson

Meson needs native understanding of symbol version scripts

Offen

#3.047 geöffnet am 12.02.2018

 (29 Kommentare) (16 Reaktionen) (0 zugewiesene Personen)Python (1.465 Forks)batch import
compilersenhancementhelp wanted

Repository-Metriken

Stars
 (4.978 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 139T 13h) (51 gemergte PRs in 30 T)

Beschreibung

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!

Contributor Guide