build: use cc.get_supported_arguments()
Signed-off-by: Ran Benita <ran@unusedvar.com>master
parent
0615c91133
commit
d67c9cfffb
|
@ -15,7 +15,7 @@ cc = meson.get_compiler('c')
|
||||||
dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'xkbcommon')
|
dir_libexec = join_paths(get_option('prefix'), get_option('libexecdir'), 'xkbcommon')
|
||||||
|
|
||||||
# Compiler flags.
|
# Compiler flags.
|
||||||
foreach cflag: [
|
cflags = [
|
||||||
'-fvisibility=hidden',
|
'-fvisibility=hidden',
|
||||||
'-fno-strict-aliasing',
|
'-fno-strict-aliasing',
|
||||||
'-fsanitize-undefined-trap-on-error',
|
'-fsanitize-undefined-trap-on-error',
|
||||||
|
@ -34,10 +34,7 @@ foreach cflag: [
|
||||||
'-Wwrite-strings',
|
'-Wwrite-strings',
|
||||||
'-Wno-documentation-deprecated-sync',
|
'-Wno-documentation-deprecated-sync',
|
||||||
]
|
]
|
||||||
if cc.has_argument(cflag)
|
add_project_arguments(cc.get_supported_arguments(cflags), language: 'c')
|
||||||
add_project_arguments(cflag, language: 'c')
|
|
||||||
endif
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
|
|
||||||
# The XKB config root.
|
# The XKB config root.
|
||||||
|
|
Loading…
Reference in New Issue