diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-02-15 17:37:35 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-02-18 15:08:27 +0100 |
commit | 306c147b3e6899de5f86a49ef2bccf29c7747856 (patch) | |
tree | f242bea5478a54a49633cd08a55d7c2d7e2f1127 | |
parent | 720fbeec1f1b9e6f0c50f36d22bc4e6a65f24d58 (diff) | |
download | network-manager-applet-306c147b3e6899de5f86a49ef2bccf29c7747856.tar.gz |
meson: check for -Wl,--gc-sections linker flag properly
WARNING: -Wl,--gc-sections looks like a linker argument, but
has_argument and other similar methods only support checking compiler
arguments. Using them to check linker arguments are never supported, and
results are likely to be wrong regardless of the compiler you are using.
has_link_argument or other similar method can be used instead.
Requires newer meson. Sigh...
-rw-r--r-- | meson.build | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 63c26877..6ce657c3 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( 'buildtype=debugoptimized', 'c_std=gnu99' ], - meson_version: '>= 0.43.0' + meson_version: '>= 0.46.0' ) nma_name = 'nm-applet' @@ -70,9 +70,8 @@ if enable_ld_gc test_ldflags = ['-Wl,--gc-sections'] - foreach cflag: test_cflags + test_ldflags - assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.') - endforeach + assert(cc.has_multi_arguments(test_cflags), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.') + assert(cc.has_multi_link_arguments(test_ldflags), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.') common_flags += test_cflags common_ldflags += test_ldflags |