[dia/zbrown/graphene-rect: 10/11] build: add some more cflags
- From: Zander Brown <zbrown src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia/zbrown/graphene-rect: 10/11] build: add some more cflags
- Date: Sat, 1 May 2021 22:04:24 +0000 (UTC)
commit 4bd92e9d275f8aaf01c5b94fed64df77005515da
Author: Zander Brown <zbrown gnome org>
Date: Tue Apr 6 23:24:44 2021 +0100
build: add some more cflags
Taken from libawaita
https://gitlab.gnome.org/GNOME/dia/-/issues/37
meson.build | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 70ad1396e..accd55bd8 100644
--- a/meson.build
+++ b/meson.build
@@ -88,24 +88,49 @@ add_project_arguments([
global_c_args = []
test_c_args = [
+ '-Wcast-align',
'-Wdeclaration-after-statement',
['-Werror=format-security', '-Werror=format=2'],
+ '-Wendif-labels',
+ '-Werror=incompatible-pointer-types',
'-Werror=missing-declarations',
+ '-Werror=overflow',
+ '-Werror=return-type',
+ '-Werror=shift-count-overflow',
+ '-Werror=shift-overflow=2',
+ '-Werror=implicit-fallthrough=3',
'-Wformat-nonliteral',
'-Wformat-security',
'-Winit-self',
'-Wmaybe-uninitialized',
+ '-Wmissing-field-initializers',
+ '-Wmissing-include-dirs',
+ '-Wmissing-noreturn',
+ '-Wnested-externs',
+ '-Wno-missing-field-initializers',
+ '-Wno-sign-compare',
'-Wno-strict-aliasing',
'-Wno-unused-parameter',
'-Wold-style-definition',
+ '-Wpointer-arith',
+ '-Wredundant-decls',
'-Wshadow',
- # When gtk3
- # '-Wstrict-prototypes',
+ '-Wstrict-prototypes',
'-Wswitch-default',
'-Wswitch-enum',
+ '-Wtype-limits',
+ '-Wundef',
'-Wunused-function',
]
+target_system = target_machine.system()
+
+if get_option('buildtype') != 'plain'
+ if target_system != 'windows'
+ test_c_args += '-fstack-protector-strong'
+ endif
+endif
+
foreach arg: test_c_args
if cc.has_multi_arguments(arg)
global_c_args += arg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]