Fix arm cflags
-mthumb-interwork was missing from the beginning. The Clang cflags copy was only a shallow copy, so our clang-specific fixups were affecting the GCC cflags as well. The cortex-a15 replacement was removed from build/core with this change: https://android-review.googlesource.com/#/c/143851 Change-Id: Ib6300e064f6ec4f6a7174d5e2aeacad1c359f7ea
This commit is contained in:
parent
01432f6b11
commit
f5a959c99f
1 changed files with 16 additions and 3 deletions
|
@ -27,6 +27,8 @@ var (
|
|||
"-fno-builtin-sin",
|
||||
"-fno-strict-volatile-bitfields",
|
||||
|
||||
"-mthumb-interwork",
|
||||
|
||||
// TARGET_RELEASE_CFLAGS
|
||||
"-DNDEBUG",
|
||||
"-g",
|
||||
|
@ -100,10 +102,22 @@ var (
|
|||
},
|
||||
}
|
||||
|
||||
armClangCpuVariantCflags = armCpuVariantCflags
|
||||
armClangArchVariantCflags = armArchVariantCflags
|
||||
armClangCpuVariantCflags = copyVariantFlags(armCpuVariantCflags)
|
||||
armClangArchVariantCflags = copyVariantFlags(armArchVariantCflags)
|
||||
)
|
||||
|
||||
func copyVariantFlags(m map[string][]string) map[string][]string {
|
||||
ret := make(map[string][]string, len(m))
|
||||
for k, v := range m {
|
||||
l := make([]string, len(m[k]))
|
||||
for i := range m[k] {
|
||||
l[i] = v[i]
|
||||
}
|
||||
ret[k] = l
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func init() {
|
||||
replaceFirst := func(slice []string, from, to string) {
|
||||
if slice[0] != from {
|
||||
|
@ -114,7 +128,6 @@ func init() {
|
|||
}
|
||||
|
||||
replaceFirst(armClangArchVariantCflags["armv5te"], "-march=armv5te", "-march=armv5t")
|
||||
replaceFirst(armClangCpuVariantCflags["cortex-a15"], "-mcpu=cortex-a15", "-march=armv7-a")
|
||||
armClangCpuVariantCflags["krait"] = []string{
|
||||
"-mcpu=krait",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue