Consolidate global cflags
Move all the flags that are used everywhere (or should be used
everywhere) into cc/config/global.go:
-no-canonical-prefixes
-fno-exceptions
-Wno-multichar
-O2
-g
-fno-strict-aliasing
Also remove flags that are already in noOverrideGlobalCflags:
-Werror=pointer-to-int-cast
-Werror=int-to-pointer-cast
x86 and x86_64 were specifying -fstrict-aliasing, but that was
being overriden later by -fno-strict-aliasing, so remove it.
ARM devices still override -fno-strict-aliasing to -fstrict-aliasing
when using ARM (vs. Thumb) instruction set.
Bug: 68855788
Test: m checkbuild
Change-Id: Ia2b5891bdefb60f974ad92b4b84a8548c2dcc7dc
diff --git a/cc/config/global.go b/cc/config/global.go
index dae218c..5587eae 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -34,9 +34,19 @@
"-Winit-self",
"-Wpointer-arith",
- // COMMON_RELEASE_CFLAGS
+ // Make paths in deps files relative
+ "-no-canonical-prefixes",
+
"-DNDEBUG",
"-UDEBUG",
+
+ "-fno-exceptions",
+ "-Wno-multichar",
+
+ "-O2",
+ "-g",
+
+ "-fno-strict-aliasing",
}
commonGlobalConlyflags = []string{}