File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,34 @@ project('debugcc',
9
9
]
10
10
)
11
11
12
+ # Set advanced compiler flags
13
+ compiler = meson .get_compiler(' c' )
14
+
15
+ compiler_cflags = [' -Wno-unused-parameter' ,
16
+ ' -Wno-unused-result' ,
17
+ ' -Wno-missing-field-initializers' ,
18
+ ' -Wno-sign-compare' ,
19
+ ' -Wundef' ,
20
+ ' -Wnull-dereference' ,
21
+ ' -Wdouble-promotion' ,
22
+ ' -Wshadow' ,
23
+ ' -Wpointer-arith' ,
24
+ ' -Wwrite-strings' ,
25
+ ' -Wstrict-overflow=4' ]
26
+
27
+ # TODO add clang specific options
28
+ if compiler.get_id() == ' gcc'
29
+ compiler_cflags += [' -Wformat-signedness' ,
30
+ ' -Wduplicated-cond' ,
31
+ ' -Wduplicated-branches' ,
32
+ ' -Wvla-larger-than=1' ,
33
+ ' -Walloc-zero' ,
34
+ ' -Wunsafe-loop-optimizations' ,
35
+ ' -Wcast-align' ,
36
+ ' -Wlogical-op' ,
37
+ ' -Wjump-misses-init' ]
38
+ endif
39
+
12
40
platforms = [
13
41
' ipq8064' ,
14
42
' msm8936' ,
You can’t perform that action at this time.
0 commit comments