From 1489c20770f882e2cf778190269d4abab5cc018e Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sat, 24 Feb 2018 14:01:46 +0000 Subject: [PATCH] meson: Use get_supported_arguments() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of iterating over the list of compiler flags, we should use the get_supported_arguments() method of the compiler object, which does it for us — and maybe, in the future, will be optimised to do the checks in parallel. --- meson.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 9281ea5..9a09238 100644 --- a/meson.build +++ b/meson.build @@ -159,12 +159,7 @@ else test_cflags = [] endif -common_cflags = [] -foreach cflag: test_cflags - if cc.has_argument(cflag) - common_cflags += cflag - endif -endforeach +common_cflags = cc.get_supported_arguments(test_cflags) libtype = get_option('default_library')