mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
build: Add -Wno-typedef-redefinition to CFLAGS
Without the -Wno-typedef-redefinition option, clang complains if a typedef gets redefined in gnu99 mode (since this is officially a C11 feature). This also happened with old versions of GCC. So, don't break the build on such warn, since we want to support toolchains that supports C11 anyways.
This commit is contained in:
parent
5697c11f1f
commit
5b0ae99e9a
@ -580,6 +580,10 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
|
|||||||
'-Werror=missing-prototypes',
|
'-Werror=missing-prototypes',
|
||||||
'-Werror=pointer-sign',
|
'-Werror=pointer-sign',
|
||||||
'-Wno-string-plus-int',
|
'-Wno-string-plus-int',
|
||||||
|
# We require a compiler that supports C11 even though it's not yet a
|
||||||
|
# strict requirement, so allow typedef redefinition not to break clang and
|
||||||
|
# older gcc versions.
|
||||||
|
'-Wno-typedef-redefinition',
|
||||||
]
|
]
|
||||||
warning_cxx_args = warning_common_args
|
warning_cxx_args = warning_common_args
|
||||||
warning_objc_args = warning_c_args
|
warning_objc_args = warning_c_args
|
||||||
|
Loading…
Reference in New Issue
Block a user