diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2018-08-30 16:13:07 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2018-08-30 16:16:03 +0100 |
commit | 2b93691f331115b7a18747163a5ec38e99392788 (patch) | |
tree | 8474b6c88c2f175ea818d9806585b51c85aa4b1d /meson.build | |
parent | 98be56d131dc7aa2cb95cbe1d4ea646cb6e924b8 (diff) | |
download | pango-2b93691f331115b7a18747163a5ec38e99392788.tar.gz |
build: Use Meson functions for argument checking
We can ask Meson to check compiler and linker arguments and return us
the list of arguments it found, instead of checking one at a time, or
none at all.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build index f32400f0..aded99ce 100644 --- a/meson.build +++ b/meson.build @@ -124,11 +124,7 @@ if get_option('default_library') != 'static' endif # Check all compiler flags -foreach cflag: test_cflags - if cc.has_argument(cflag) - common_cflags += [ cflag ] - endif -endforeach +common_cflags += cc.get_supported_arguments(test_cflags) # Isolate the C++ compiler flags foreach cflag: common_cflags @@ -139,11 +135,7 @@ endforeach # Linker flags if host_machine.system() == 'linux' - foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ] - if cc.has_argument(ldflag) - common_ldflags += [ ldflag ] - endif - endforeach + common_ldflags += cc.get_supported_link_arguments([ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]) endif # Maintain compatibility with autotools on macOS |