From d67c9cfffbc356bbc6b8685c117e0b63cdfc059b Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 25 Jul 2020 15:24:40 +0300 Subject: [PATCH] build: use cc.get_supported_arguments() Signed-off-by: Ran Benita --- meson.build | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index a2d8592..4d2f8e8 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,7 @@ cc = meson.get_compiler('c') dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'xkbcommon') # Compiler flags. -foreach cflag: [ +cflags = [ '-fvisibility=hidden', '-fno-strict-aliasing', '-fsanitize-undefined-trap-on-error', @@ -34,10 +34,7 @@ foreach cflag: [ '-Wwrite-strings', '-Wno-documentation-deprecated-sync', ] - if cc.has_argument(cflag) - add_project_arguments(cflag, language: 'c') - endif -endforeach +add_project_arguments(cc.get_supported_arguments(cflags), language: 'c') # The XKB config root. -- 2.7.4