Merge "Revert "Remove armv7-a without neon support"" am: 48db2b15fb

am: ecbadc5b6c

Change-Id: Ib59fed4c3f2d6405c64224152e055280fd455f51
This commit is contained in:
Dan Albert 2019-02-20 05:27:20 -08:00 committed by android-build-merger
commit 856c8234f2
2 changed files with 13 additions and 1 deletions

View File

@ -107,6 +107,7 @@ module {
var archVariants = map[ArchType][]string{ var archVariants = map[ArchType][]string{
Arm: { Arm: {
"armv7-a",
"armv7-a-neon", "armv7-a-neon",
"armv8-a", "armv8-a",
"armv8-2a", "armv8-2a",
@ -1314,6 +1315,7 @@ type archConfig struct {
func getMegaDeviceConfig() []archConfig { func getMegaDeviceConfig() []archConfig {
return []archConfig{ return []archConfig{
{"arm", "armv7-a", "generic", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "generic", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "generic", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "cortex-a7", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "cortex-a7", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "cortex-a8", []string{"armeabi-v7a"}}, {"arm", "armv7-a-neon", "cortex-a8", []string{"armeabi-v7a"}},
@ -1365,7 +1367,7 @@ func getMegaDeviceConfig() []archConfig {
func getNdkAbisConfig() []archConfig { func getNdkAbisConfig() []archConfig {
return []archConfig{ return []archConfig{
{"arm", "armv7-a-neon", "", []string{"armeabi"}}, {"arm", "armv7-a", "", []string{"armeabi"}},
{"arm64", "armv8-a", "", []string{"arm64-v8a"}}, {"arm64", "armv8-a", "", []string{"arm64-v8a"}},
{"x86", "", "", []string{"x86"}}, {"x86", "", "", []string{"x86"}},
{"x86_64", "", "", []string{"x86_64"}}, {"x86_64", "", "", []string{"x86_64"}},

View File

@ -51,6 +51,11 @@ var (
} }
armClangArchVariantCflags = map[string][]string{ armClangArchVariantCflags = map[string][]string{
"armv7-a": []string{
"-march=armv7-a",
"-mfloat-abi=softfp",
"-mfpu=vfpv3-d16",
},
"armv7-a-neon": []string{ "armv7-a-neon": []string{
"-march=armv7-a", "-march=armv7-a",
"-mfloat-abi=softfp", "-mfloat-abi=softfp",
@ -184,6 +189,8 @@ func init() {
pctx.StaticVariable("ArmClangThumbCflags", strings.Join(ClangFilterUnknownCflags(armThumbCflags), " ")) pctx.StaticVariable("ArmClangThumbCflags", strings.Join(ClangFilterUnknownCflags(armThumbCflags), " "))
// Clang arch variant cflags // Clang arch variant cflags
pctx.StaticVariable("ArmClangArmv7ACflags",
strings.Join(armClangArchVariantCflags["armv7-a"], " "))
pctx.StaticVariable("ArmClangArmv7ANeonCflags", pctx.StaticVariable("ArmClangArmv7ANeonCflags",
strings.Join(armClangArchVariantCflags["armv7-a-neon"], " ")) strings.Join(armClangArchVariantCflags["armv7-a-neon"], " "))
pctx.StaticVariable("ArmClangArmv8ACflags", pctx.StaticVariable("ArmClangArmv8ACflags",
@ -212,6 +219,7 @@ func init() {
var ( var (
armClangArchVariantCflagsVar = map[string]string{ armClangArchVariantCflagsVar = map[string]string{
"armv7-a": "${config.ArmClangArmv7ACflags}",
"armv7-a-neon": "${config.ArmClangArmv7ANeonCflags}", "armv7-a-neon": "${config.ArmClangArmv7ANeonCflags}",
"armv8-a": "${config.ArmClangArmv8ACflags}", "armv8-a": "${config.ArmClangArmv8ACflags}",
"armv8-2a": "${config.ArmClangArmv82ACflags}", "armv8-2a": "${config.ArmClangArmv82ACflags}",
@ -327,6 +335,8 @@ func armToolchainFactory(arch android.Arch) Toolchain {
default: default:
fixCortexA8 = "-Wl,--no-fix-cortex-a8" fixCortexA8 = "-Wl,--no-fix-cortex-a8"
} }
case "armv7-a":
fixCortexA8 = "-Wl,--fix-cortex-a8"
case "armv8-a", "armv8-2a": case "armv8-a", "armv8-2a":
// Nothing extra for armv8-a/armv8-2a // Nothing extra for armv8-a/armv8-2a
default: default: