mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-04 10:40:47 +01:00
meson: Fix the check for --version-script support
At the time we do this check, version_script has not yet been generated, so we have to use something else. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
154cc9d5ca
commit
64e490afe7
3 changed files with 21 additions and 3 deletions
|
|
@ -330,6 +330,7 @@ endif
|
|||
noinst_PROGRAMS =
|
||||
|
||||
EXTRA_DIST += meson.build
|
||||
EXTRA_DIST += test-version-script
|
||||
|
||||
# Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
|
||||
include $(top_srcdir)/aminclude_static.am
|
||||
|
|
|
|||
|
|
@ -172,9 +172,16 @@ version_script = configure_file(
|
|||
configuration: data_config,
|
||||
)
|
||||
|
||||
version_flags = '-Wl,--version-script,@0@'.format(version_script)
|
||||
if not cc.has_link_argument(version_flags)
|
||||
version_flags = []
|
||||
# We can't use version_script to check for support, because it hasn't been
|
||||
# generated yet, so use a static source file instead.
|
||||
if cc.has_link_argument(
|
||||
'-Wl,--version-script,@0@'.format(
|
||||
meson.current_source_dir() / 'test-version-script'
|
||||
)
|
||||
)
|
||||
version_flags = ['-Wl,--version-script,@0@'.format(version_script)]
|
||||
else
|
||||
version_flags = []
|
||||
endif
|
||||
|
||||
libdbus = library('dbus-1',
|
||||
|
|
|
|||
10
dbus/test-version-script
Normal file
10
dbus/test-version-script
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
NOT_REALLY_LIBDBUS_1_3 {
|
||||
global:
|
||||
dbus_*;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
NOT_REALLY_LIBDBUS_PRIVATE_1.2.3 {
|
||||
global:
|
||||
_dbus_*;
|
||||
};
|
||||
Loading…
Add table
Reference in a new issue