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,47 +167,48 @@ cdata.set('HAVE_FDWALK',
cc.has_function('fdwalk') cc.has_function('fdwalk')
) )
all_warnings = [ buildtype = get_option('buildtype')
'-fno-strict-aliasing', if buildtype != 'plain'
'-Wpointer-arith', all_warnings = [
'-Wmissing-declarations', '-fno-strict-aliasing',
'-Wimplicit-function-declaration', '-Wpointer-arith',
'-Wformat=2', '-Wmissing-declarations',
'-Wformat-nonliteral', '-Wimplicit-function-declaration',
'-Wformat-security', '-Wformat=2',
'-Wstrict-prototypes', '-Wformat-nonliteral',
'-Wmissing-prototypes', '-Wformat-security',
'-Wnested-externs', '-Wstrict-prototypes',
'-Wold-style-definition', '-Wmissing-prototypes',
'-Wundef', '-Wnested-externs',
'-Wunused', '-Wold-style-definition',
'-Wcast-align', '-Wundef',
'-Wmissing-noreturn', '-Wunused',
'-Wmissing-format-attribute', '-Wcast-align',
'-Wmissing-include-dirs', '-Wmissing-noreturn',
'-Wlogical-op', '-Wmissing-format-attribute',
'-Wignored-qualifiers', '-Wmissing-include-dirs',
'-Werror=redundant-decls', '-Wlogical-op',
'-Werror=implicit', '-Wignored-qualifiers',
'-Werror=nonnull', '-Werror=redundant-decls',
'-Werror=init-self', '-Werror=implicit',
'-Werror=main', '-Werror=nonnull',
'-Werror=missing-braces', '-Werror=init-self',
'-Werror=sequence-point', '-Werror=main',
'-Werror=return-type', '-Werror=missing-braces',
'-Werror=trigraphs', '-Werror=sequence-point',
'-Werror=array-bounds', '-Werror=return-type',
'-Werror=write-strings', '-Werror=trigraphs',
'-Werror=address', '-Werror=array-bounds',
'-Werror=int-to-pointer-cast', '-Werror=write-strings',
'-Werror=pointer-to-int-cast', '-Werror=address',
'-Werror=empty-body', '-Werror=int-to-pointer-cast',
'-Werror=write-strings', '-Werror=pointer-to-int-cast',
] '-Werror=empty-body',
'-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') add_project_arguments(supported_warnings, language: 'c')
endif
if get_option('debug') if get_option('debug')
debug_c_args = [ debug_c_args = [