aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-05-13 07:23:17 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-13 07:23:17 +0000
commitd8bfb82b4291dd9e8c81b3d629137dca65f32cbc (patch)
tree5e39b2b610b04413b41615546e693379fa66ff06
parent62c600de2fa337229cc5865590dc9cb9d05f923b (diff)
parent01dd3fb5043b1af6913292bd237d1ba08f57e623 (diff)
downloadbuild_soong-d8bfb82b4291dd9e8c81b3d629137dca65f32cbc.tar.gz
build_soong-d8bfb82b4291dd9e8c81b3d629137dca65f32cbc.tar.bz2
build_soong-d8bfb82b4291dd9e8c81b3d629137dca65f32cbc.zip
Snap for 4778776 from 01dd3fb5043b1af6913292bd237d1ba08f57e623 to pi-release
Change-Id: I7125d2c929c881c5d3e0d7436ba32a1c5e5e4bb6
-rw-r--r--android/arch.go2
-rw-r--r--android/module.go7
-rw-r--r--cc/config/arm64_device.go52
-rw-r--r--cc/config/arm_device.go27
4 files changed, 79 insertions, 9 deletions
diff --git a/android/arch.go b/android/arch.go
index 3990d7b2..88f9f659 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -956,6 +956,7 @@ func getMegaDeviceConfig() []archConfig {
{"arm", "armv7-a-neon", "cortex-a53", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "cortex-a53.a57", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "cortex-a73", []string{"armeabi-v7a"}},
+ {"arm", "armv7-a-neon", "cortex-a75", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "denver", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "krait", []string{"armeabi-v7a"}},
{"arm", "armv7-a-neon", "kryo", []string{"armeabi-v7a"}},
@@ -967,6 +968,7 @@ func getMegaDeviceConfig() []archConfig {
{"arm64", "armv8-a", "kryo", []string{"arm64-v8a"}},
{"arm64", "armv8-a", "exynos-m1", []string{"arm64-v8a"}},
{"arm64", "armv8-a", "exynos-m2", []string{"arm64-v8a"}},
+ {"arm64", "armv8-2a", "cortex-a75", []string{"arm64-v8a"}},
{"mips", "mips32-fp", "", []string{"mips"}},
{"mips", "mips32r2-fp", "", []string{"mips"}},
{"mips", "mips32r2-fp-xburst", "", []string{"mips"}},
diff --git a/android/module.go b/android/module.go
index 3276ab36..1e544700 100644
--- a/android/module.go
+++ b/android/module.go
@@ -995,13 +995,6 @@ func (a *androidModuleContext) skipInstall(fullInstallPath OutputPath) bool {
return true
}
- // We'll need a solution for choosing which of modules with the same name in different
- // namespaces to install. For now, reuse the list of namespaces exported to Make as the
- // list of namespaces to install in a Soong-only build.
- if !a.module.base().commonProperties.NamespaceExportedToMake {
- return true
- }
-
if a.Device() {
if a.Config().SkipDeviceInstall() {
return true
diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go
index 5bb7749a..c4426e31 100644
--- a/cc/config/arm64_device.go
+++ b/cc/config/arm64_device.go
@@ -27,6 +27,15 @@ var (
"-Werror=implicit-function-declaration",
}
+ arm64ArchVariantCflags = map[string][]string{
+ "armv8-a": []string{
+ "-march=armv8-a",
+ },
+ "armv8-2a": []string{
+ "-march=armv8.2a",
+ },
+ }
+
arm64Ldflags = []string{
"-Wl,-m,aarch64_elf64_le_vec",
"-Wl,--hash-style=gnu",
@@ -41,6 +50,17 @@ var (
"cortex-a53": []string{
"-mcpu=cortex-a53",
},
+ "cortex-a55": []string{
+ // The cortex-a55 target is not yet supported,
+ // so use cortex-a53.
+ "-mcpu=cortex-a53",
+ },
+ "cortex-a75": []string{
+ // Use the cortex-a53 since it is similar to the little
+ // core (cortex-a55) and is sensitive to ordering.
+ // The cortex-a55 target is not yet supported.
+ "-mcpu=cortex-a53",
+ },
"kryo": []string{
// Use the cortex-a57 cpu since some compilers
// don't support a Kryo specific target yet.
@@ -64,8 +84,11 @@ const (
func init() {
android.RegisterArchVariants(android.Arm64,
"armv8_a",
+ "armv8_2a",
"cortex-a53",
+ "cortex-a55",
"cortex-a73",
+ "cortex-a75",
"kryo",
"exynos-m1",
"exynos-m2",
@@ -88,11 +111,19 @@ func init() {
pctx.StaticVariable("Arm64ClangLdflags", strings.Join(ClangFilterUnknownCflags(arm64Ldflags), " "))
pctx.StaticVariable("Arm64ClangCppflags", strings.Join(ClangFilterUnknownCflags(arm64Cppflags), " "))
+ pctx.StaticVariable("Arm64ClangArmv8ACflags", strings.Join(arm64ArchVariantCflags["armv8-a"], " "))
+ pctx.StaticVariable("Arm64ClangArmv82ACflags", strings.Join(arm64ArchVariantCflags["armv8-2a"], " "))
+
pctx.StaticVariable("Arm64CortexA53Cflags",
strings.Join(arm64CpuVariantCflags["cortex-a53"], " "))
pctx.StaticVariable("Arm64ClangCortexA53Cflags",
strings.Join(arm64ClangCpuVariantCflags["cortex-a53"], " "))
+ pctx.StaticVariable("Arm64CortexA55Cflags",
+ strings.Join(arm64CpuVariantCflags["cortex-a55"], " "))
+ pctx.StaticVariable("Arm64ClangCortexA55Cflags",
+ strings.Join(arm64ClangCpuVariantCflags["cortex-a55"], " "))
+
pctx.StaticVariable("Arm64KryoCflags",
strings.Join(arm64CpuVariantCflags["kryo"], " "))
pctx.StaticVariable("Arm64ClangKryoCflags",
@@ -113,16 +144,25 @@ var (
arm64CpuVariantCflagsVar = map[string]string{
"": "",
"cortex-a53": "${config.Arm64CortexA53Cflags}",
+ "cortex-a55": "${config.Arm64CortexA55Cflags}",
"cortex-a73": "${config.Arm64CortexA53Cflags}",
+ "cortex-a75": "${config.Arm64CortexA55Cflags}",
"kryo": "${config.Arm64KryoCflags}",
"exynos-m1": "${config.Arm64ExynosM1Cflags}",
"exynos-m2": "${config.Arm64ExynosM2Cflags}",
}
+ arm64ClangArchVariantCflagsVar = map[string]string{
+ "armv8-a": "${config.Arm64ClangArmv8ACflags}",
+ "armv8-2a": "${config.Arm64ClangArmv82ACflags}",
+ }
+
arm64ClangCpuVariantCflagsVar = map[string]string{
"": "",
"cortex-a53": "${config.Arm64ClangCortexA53Cflags}",
+ "cortex-a55": "${config.Arm64ClangCortexA55Cflags}",
"cortex-a73": "${config.Arm64ClangCortexA53Cflags}",
+ "cortex-a75": "${config.Arm64ClangCortexA55Cflags}",
"kryo": "${config.Arm64ClangKryoCflags}",
"exynos-m1": "${config.Arm64ClangExynosM1Cflags}",
"exynos-m2": "${config.Arm64ClangExynosM2Cflags}",
@@ -197,13 +237,21 @@ func (toolchainArm64) SanitizerRuntimeLibraryArch() string {
}
func arm64ToolchainFactory(arch android.Arch) Toolchain {
- if arch.ArchVariant != "armv8-a" {
+ switch arch.ArchVariant {
+ case "armv8-a":
+ case "armv8-2a":
+ // Nothing extra for armv8-a/armv8-2a
+ default:
panic(fmt.Sprintf("Unknown ARM architecture version: %q", arch.ArchVariant))
}
+ toolchainClangCflags := []string{arm64ClangArchVariantCflagsVar[arch.ArchVariant]}
+ toolchainClangCflags = append(toolchainClangCflags,
+ variantOrDefault(arm64ClangCpuVariantCflagsVar, arch.CpuVariant))
+
return &toolchainArm64{
toolchainCflags: variantOrDefault(arm64CpuVariantCflagsVar, arch.CpuVariant),
- toolchainClangCflags: variantOrDefault(arm64ClangCpuVariantCflagsVar, arch.CpuVariant),
+ toolchainClangCflags: strings.Join(toolchainClangCflags, " "),
}
}
diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go
index 0d3750e3..4e0f6e05 100644
--- a/cc/config/arm_device.go
+++ b/cc/config/arm_device.go
@@ -97,6 +97,24 @@ var (
// better solution comes around. See Bug 27340895
"-D__ARM_FEATURE_LPAE=1",
},
+ "cortex-a55": []string{
+ "-mcpu=cortex-a53",
+ "-mfpu=neon-fp-armv8",
+ // Fake an ARM compiler flag as these processors support LPAE which GCC/clang
+ // don't advertise.
+ // TODO This is a hack and we need to add it for each processor that supports LPAE until some
+ // better solution comes around. See Bug 27340895
+ "-D__ARM_FEATURE_LPAE=1",
+ },
+ "cortex-a75": []string{
+ "-mcpu=cortex-a53",
+ "-mfpu=neon-fp-armv8",
+ // Fake an ARM compiler flag as these processors support LPAE which GCC/clang
+ // don't advertise.
+ // TODO This is a hack and we need to add it for each processor that supports LPAE until some
+ // better solution comes around. See Bug 27340895
+ "-D__ARM_FEATURE_LPAE=1",
+ },
"krait": []string{
"-mcpu=cortex-a15",
"-mfpu=neon-vfpv4",
@@ -141,7 +159,9 @@ func init() {
"cortex-a15",
"cortex-a53",
"cortex-a53-a57",
+ "cortex-a55",
"cortex-a73",
+ "cortex-a75",
"krait",
"kryo",
"exynos-m1",
@@ -189,6 +209,7 @@ func init() {
pctx.StaticVariable("ArmCortexA8Cflags", strings.Join(armCpuVariantCflags["cortex-a8"], " "))
pctx.StaticVariable("ArmCortexA15Cflags", strings.Join(armCpuVariantCflags["cortex-a15"], " "))
pctx.StaticVariable("ArmCortexA53Cflags", strings.Join(armCpuVariantCflags["cortex-a53"], " "))
+ pctx.StaticVariable("ArmCortexA55Cflags", strings.Join(armCpuVariantCflags["cortex-a55"], " "))
pctx.StaticVariable("ArmKraitCflags", strings.Join(armCpuVariantCflags["krait"], " "))
pctx.StaticVariable("ArmKryoCflags", strings.Join(armCpuVariantCflags["kryo"], " "))
@@ -221,6 +242,8 @@ func init() {
strings.Join(armClangCpuVariantCflags["cortex-a15"], " "))
pctx.StaticVariable("ArmClangCortexA53Cflags",
strings.Join(armClangCpuVariantCflags["cortex-a53"], " "))
+ pctx.StaticVariable("ArmClangCortexA55Cflags",
+ strings.Join(armClangCpuVariantCflags["cortex-a55"], " "))
pctx.StaticVariable("ArmClangKraitCflags",
strings.Join(armClangCpuVariantCflags["krait"], " "))
pctx.StaticVariable("ArmClangKryoCflags",
@@ -241,7 +264,9 @@ var (
"cortex-a15": "${config.ArmCortexA15Cflags}",
"cortex-a53": "${config.ArmCortexA53Cflags}",
"cortex-a53.a57": "${config.ArmCortexA53Cflags}",
+ "cortex-a55": "${config.ArmCortexA55Cflags}",
"cortex-a73": "${config.ArmCortexA53Cflags}",
+ "cortex-a75": "${config.ArmCortexA55Cflags}",
"krait": "${config.ArmKraitCflags}",
"kryo": "${config.ArmKryoCflags}",
"exynos-m1": "${config.ArmCortexA53Cflags}",
@@ -262,7 +287,9 @@ var (
"cortex-a15": "${config.ArmClangCortexA15Cflags}",
"cortex-a53": "${config.ArmClangCortexA53Cflags}",
"cortex-a53.a57": "${config.ArmClangCortexA53Cflags}",
+ "cortex-a55": "${config.ArmClangCortexA55Cflags}",
"cortex-a73": "${config.ArmClangCortexA53Cflags}",
+ "cortex-a75": "${config.ArmClangCortexA55Cflags}",
"krait": "${config.ArmClangKraitCflags}",
"kryo": "${config.ArmClangKryoCflags}",
"exynos-m1": "${config.ArmClangCortexA53Cflags}",