build: Use cc.get_supported_arguments() instead of open-coding
I added support to Meson for cc.get_supported_arguments() when I was typing out the initial build because I didn't like the open-coding, then completely forgot to update Weston when it got merged. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
3240ccc69d
commit
022e79bf3e
10
meson.build
10
meson.build
|
@ -60,8 +60,7 @@ config_h = configuration_data()
|
|||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
global_args = []
|
||||
global_args_maybe = [
|
||||
global_args = cc.get_supported_arguments(
|
||||
'-Wmissing-prototypes',
|
||||
'-Wno-unused-parameter',
|
||||
'-Wno-shift-negative-value', # required due to Pixman
|
||||
|
@ -69,12 +68,7 @@ global_args_maybe = [
|
|||
'-Wno-pedantic',
|
||||
'-Wundef',
|
||||
'-fvisibility=hidden',
|
||||
]
|
||||
foreach a : global_args_maybe
|
||||
if cc.has_argument(a)
|
||||
global_args += a
|
||||
endif
|
||||
endforeach
|
||||
)
|
||||
add_global_arguments(global_args, language: 'c')
|
||||
|
||||
if cc.has_header_symbol('sys/sysmacros.h', 'major')
|
||||
|
|
Loading…
Reference in New Issue