mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 04:48:10 +02:00
meson: use has_link_argument() to check linker flags support
This commit is contained in:
parent
a3c9dccfd0
commit
65572f5329
1 changed files with 5 additions and 1 deletions
|
|
@ -154,10 +154,14 @@ if enable_ld_gc
|
||||||
|
|
||||||
test_ldflags = ['-Wl,--gc-sections']
|
test_ldflags = ['-Wl,--gc-sections']
|
||||||
|
|
||||||
foreach cflag: test_c_flags + test_ldflags
|
foreach cflag: test_c_flags
|
||||||
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
assert(cc.has_argument(cflag), 'Unused symbol eviction requested but not supported. Use -Dld_gc=false to build without it.')
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
foreach ldflag: test_ldflags
|
||||||
|
assert(cc.has_link_argument(ldflag), 'Linker garbage collection requested but not supported. Use -Dld_gc=false to build without it.')
|
||||||
|
endforeach
|
||||||
|
|
||||||
common_flags += test_c_flags
|
common_flags += test_c_flags
|
||||||
common_ldflags += test_ldflags
|
common_ldflags += test_ldflags
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue