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
This commit is contained in:
@@ -22,15 +22,11 @@ import (
|
||||
|
||||
var (
|
||||
linuxCflags = []string{
|
||||
"-fno-exceptions", // from build/core/combo/select.mk
|
||||
"-Wno-multichar", // from build/core/combo/select.mk
|
||||
|
||||
"-fdiagnostics-color",
|
||||
|
||||
"-Wa,--noexecstack",
|
||||
|
||||
"-fPIC",
|
||||
"-no-canonical-prefixes",
|
||||
|
||||
"-U_FORTIFY_SOURCE",
|
||||
"-D_FORTIFY_SOURCE=2",
|
||||
@@ -40,11 +36,6 @@ var (
|
||||
//See bug 12708004.
|
||||
"-D__STDC_FORMAT_MACROS",
|
||||
"-D__STDC_CONSTANT_MACROS",
|
||||
|
||||
// HOST_RELEASE_CFLAGS
|
||||
"-O2", // from build/core/combo/select.mk
|
||||
"-g", // from build/core/combo/select.mk
|
||||
"-fno-strict-aliasing", // from build/core/combo/select.mk
|
||||
}
|
||||
|
||||
linuxLdflags = []string{
|
||||
|
Reference in New Issue
Block a user