meson: include the library symbol version list in link_depends

This is pretty ugly, because I don't know how to use a single
definition for two purposes:
- --version-script needs a path relative to the build root
- link_depends needs a path relative to source root
Also, link_depends does not accept files() output
[https://github.com/mesonbuild/meson/issues/1172], and I don't see a way to go
from files() output to a string path that can be used to craft the -Wl arg.

Ideally, a single files() result could be used in both places.
I'm leaving this as a separate commit for now.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-04-23 21:47:26 -04:00
parent 572baca1d4
commit 6b30f2801b
4 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ libsystemd_internal = static_library(
dependencies : [threads,
librt])
libsystemd_sym = meson.current_source_dir() + '/libsystemd.sym'
libsystemd_sym = 'src/libsystemd/libsystemd.sym'
libsystemd_pc = configure_file(
input : 'libsystemd.pc.in',
+4 -2
View File
@@ -16,17 +16,19 @@ libudev_sources = '''
############################################################
libudev_sym = meson.current_source_dir() + '/libudev.sym'
libudev_sym = 'libudev.sym'
version_script_arg = '@0@/@1@'.format(meson.current_source_dir(), libudev_sym)
libudev = shared_library(
'udev',
libudev_sources,
version : '1.6.6',
include_directories : includes,
link_args : ['-shared',
'-Wl,--version-script=' + libudev_sym],
'-Wl,--version-script=' + version_script_arg],
link_with : [libbasic,
libsystemd],
link_depends : libudev_sym,
install : true,
install_dir : rootlibdir)
+1 -1
View File
@@ -65,7 +65,7 @@ if conf.get('ENABLE_LOGIND', 0) == 1
install_data(logind_conf,
install_dir : pkgsysconfdir)
pam_systemd_sym = meson.current_source_dir() + '/pam_systemd.sym'
pam_systemd_sym = 'src/login/pam_systemd.sym'
pam_systemd_c = files('pam_systemd.c')
install_data('org.freedesktop.login1.conf',