build: Use get_supported_arguments()

Instead of checking each flag one by one, use the appropriate method of
the Meson compiler object.
This commit is contained in:
Emmanuele Bassi 2018-02-20 13:18:28 +00:00
parent bfc81767ba
commit a7e96675bd

View File

@ -262,12 +262,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)
# Symbol visibility
if get_option('default_library') != 'static'