[network-manager-applet/lr/meson-fixes: 3/4] meson: check for -Wl, --gc-sections linker flag properly
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/lr/meson-fixes: 3/4] meson: check for -Wl, --gc-sections linker flag properly
- Date: Mon, 18 Feb 2019 12:50:33 +0000 (UTC)
commit 700c017ccd67ecab7238db655edeec6d0e07099d
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Fri Feb 15 17:37:35 2019 +0100
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...
meson.build | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/meson.build b/meson.build
index b27b6972..d4b4d2d5 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]