Merge "Use -mcpu=cortex-a53 for devices with Kryo"

This commit is contained in:
Treehugger Robot
2017-11-21 22:05:44 +00:00
committed by Gerrit Code Review

View File

@@ -115,7 +115,9 @@ var (
"-D__ARM_FEATURE_LPAE=1", "-D__ARM_FEATURE_LPAE=1",
}, },
"kryo": []string{ "kryo": []string{
"-mcpu=cortex-a15", // Use cortex-a53 because the GNU assembler doesn't recognize -mcpu=kryo
// even though clang does.
"-mcpu=cortex-a53",
"-mfpu=neon-fp-armv8", "-mfpu=neon-fp-armv8",
// Fake an ARM compiler flag as these processors support LPAE which GCC/clang // Fake an ARM compiler flag as these processors support LPAE which GCC/clang
// don't advertise. // don't advertise.
@@ -158,10 +160,9 @@ func init() {
android.RegisterArchVariantFeatures(android.Arm, "armv7-a-neon", "neon") android.RegisterArchVariantFeatures(android.Arm, "armv7-a-neon", "neon")
android.RegisterArchVariantFeatures(android.Arm, "armv8-a", "neon") android.RegisterArchVariantFeatures(android.Arm, "armv8-a", "neon")
// Krait and Kryo targets are not supported by GCC, but are supported by Clang, // Krait is not supported by GCC, but is supported by Clang, so
// so override the definitions when building modules with Clang. // override the definitions when building modules with Clang.
replaceFirst(armClangCpuVariantCflags["krait"], "-mcpu=cortex-a15", "-mcpu=krait") replaceFirst(armClangCpuVariantCflags["krait"], "-mcpu=cortex-a15", "-mcpu=krait")
replaceFirst(armClangCpuVariantCflags["kryo"], "-mcpu=cortex-a15", "-mcpu=krait")
// The reason we use "-march=armv8-a+crc", instead of "-march=armv8-a", for // The reason we use "-march=armv8-a+crc", instead of "-march=armv8-a", for
// gcc is the latter would conflict with any specified/supported -mcpu! // gcc is the latter would conflict with any specified/supported -mcpu!