meson: Do not add compiler flags if 'plain' buildtype is used

That is how the 'plain' buildtype is meant in meson.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/464
This commit is contained in:
Robert Mader 2019-04-29 12:59:56 +02:00 committed by Robert Mader
parent 83e83444db
commit de0e21612c

View File

@ -167,7 +167,9 @@ cdata.set('HAVE_FDWALK',
cc.has_function('fdwalk') cc.has_function('fdwalk')
) )
all_warnings = [ buildtype = get_option('buildtype')
if buildtype != 'plain'
all_warnings = [
'-fno-strict-aliasing', '-fno-strict-aliasing',
'-Wpointer-arith', '-Wpointer-arith',
'-Wmissing-declarations', '-Wmissing-declarations',
@ -203,11 +205,10 @@ all_warnings = [
'-Werror=pointer-to-int-cast', '-Werror=pointer-to-int-cast',
'-Werror=empty-body', '-Werror=empty-body',
'-Werror=write-strings', '-Werror=write-strings',
] ]
supported_warnings = cc.get_supported_arguments(all_warnings)
supported_warnings = cc.get_supported_arguments(all_warnings) add_project_arguments(supported_warnings, language: 'c')
endif
add_project_arguments(supported_warnings, language: 'c')
if get_option('debug') if get_option('debug')
debug_c_args = [ debug_c_args = [