Skip to content

Commit

Permalink
meson: Use get_supported_arguments()
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ebassi committed Feb 24, 2018
1 parent 60bb767 commit 1489c20
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 1489c20

Please sign in to comment.