aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Cross2019-05-14 18:01:24 -0500
committerColin Cross2019-05-17 10:43:36 -0500
commit0d99f7cd8419a16132dc0aa3a6f37697dc473aad (patch)
tree18118d97e6e034b8831dec863ba4c28ab6005993
parent9a94287fc95617e2541bf5ac7c2c42a2c3adcaa0 (diff)
downloadplatform-build-soong-0d99f7cd8419a16132dc0aa3a6f37697dc473aad.tar.gz
platform-build-soong-0d99f7cd8419a16132dc0aa3a6f37697dc473aad.tar.xz
platform-build-soong-0d99f7cd8419a16132dc0aa3a6f37697dc473aad.zip
Don't create a second host arch for tests on darwin
Only x86_64 darwin is supported, not x86. Don't create an x86 host arch when running tests on darwin. Test: all soong tests Change-Id: Ic12763298345e32a1340f8fbef338d2ab4d62b2e
-rw-r--r--android/config.go22
1 files changed, 10 insertions, 12 deletions
diff --git a/android/config.go b/android/config.go
index a18feb6d..1507c252 100644
--- a/android/config.go
+++ b/android/config.go
@@ -235,20 +235,14 @@ func TestConfig(buildDir string, env map[string]string) Config {
235} 235}
236 236
237func TestArchConfigNativeBridge(buildDir string, env map[string]string) Config { 237func TestArchConfigNativeBridge(buildDir string, env map[string]string) Config {
238 testConfig := TestConfig(buildDir, env) 238 testConfig := TestArchConfig(buildDir, env)
239 config := testConfig.config 239 config := testConfig.config
240 240
241 config.Targets = map[OsType][]Target{ 241 config.Targets[Android] = []Target{
242 Android: []Target{ 242 {Android, Arch{ArchType: X86_64, ArchVariant: "silvermont", Native: true, Abi: []string{"arm64-v8a"}}, NativeBridgeDisabled},
243 {Android, Arch{ArchType: X86_64, ArchVariant: "silvermont", Native: true, Abi: []string{"arm64-v8a"}}, NativeBridgeDisabled}, 243 {Android, Arch{ArchType: X86, ArchVariant: "silvermont", Native: true, Abi: []string{"armeabi-v7a"}}, NativeBridgeDisabled},
244 {Android, Arch{ArchType: X86, ArchVariant: "silvermont", Native: true, Abi: []string{"armeabi-v7a"}}, NativeBridgeDisabled}, 244 {Android, Arch{ArchType: Arm64, ArchVariant: "armv8-a", Native: true, Abi: []string{"arm64-v8a"}}, NativeBridgeEnabled},
245 {Android, Arch{ArchType: Arm64, ArchVariant: "armv8-a", Native: true, Abi: []string{"arm64-v8a"}}, NativeBridgeEnabled}, 245 {Android, Arch{ArchType: Arm, ArchVariant: "armv7-a-neon", Native: true, Abi: []string{"armeabi-v7a"}}, NativeBridgeEnabled},
246 {Android, Arch{ArchType: Arm, ArchVariant: "armv7-a-neon", Native: true, Abi: []string{"armeabi-v7a"}}, NativeBridgeEnabled},
247 },
248 BuildOs: []Target{
249 {BuildOs, Arch{ArchType: X86_64}, NativeBridgeDisabled},
250 {BuildOs, Arch{ArchType: X86}, NativeBridgeDisabled},
251 },
252 } 246 }
253 247
254 return testConfig 248 return testConfig
@@ -286,6 +280,10 @@ func TestArchConfig(buildDir string, env map[string]string) Config {
286 }, 280 },
287 } 281 }
288 282
283 if runtime.GOOS == "darwin" {
284 config.Targets[BuildOs] = config.Targets[BuildOs][:1]
285 }
286
289 config.BuildOsVariant = config.Targets[BuildOs][0].String() 287 config.BuildOsVariant = config.Targets[BuildOs][0].String()
290 config.BuildOsCommonVariant = getCommonTargets(config.Targets[BuildOs])[0].String() 288 config.BuildOsCommonVariant = getCommonTargets(config.Targets[BuildOs])[0].String()
291 config.TestProductVariables.DeviceArch = proptools.StringPtr("arm64") 289 config.TestProductVariables.DeviceArch = proptools.StringPtr("arm64")