mesonbuild/meson

Meson needs native understanding of symbol version scripts

Aberta

#3.047 aberto em 12 de fev. de 2018

 (29 comentários) (16 reações) (0 responsável)Python (1.465 forks)batch import
compilersenhancementhelp wanted

Métricas do repositório

Stars
 (4.978 estrelas)
Métricas de merge de PR
 (Mesclagem média 139d 13h) (51 fundiu PRs em 30d)

Description

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!

Guia do colaborador