Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.
Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546
diff --git a/android/arch_test.go b/android/arch_test.go
index 2a2fd45..a828321 100644
--- a/android/arch_test.go
+++ b/android/arch_test.go
@@ -508,9 +508,12 @@
bionic: { a: ["bionic"] },
host: { a: ["host"] },
android: { a: ["android"] },
+ glibc: { a: ["glibc"] },
+ musl: { a: ["musl"] },
linux_bionic: { a: ["linux_bionic"] },
linux: { a: ["linux"] },
linux_glibc: { a: ["linux_glibc"] },
+ linux_musl: { a: ["linux_musl"] },
windows: { a: ["windows"], enabled: true },
darwin: { a: ["darwin"] },
not_windows: { a: ["not_windows"] },
@@ -522,6 +525,8 @@
linux_x86_64: { a: ["linux_x86_64"] },
linux_glibc_x86: { a: ["linux_glibc_x86"] },
linux_glibc_x86_64: { a: ["linux_glibc_x86_64"] },
+ linux_musl_x86: { a: ["linux_musl_x86"] },
+ linux_musl_x86_64: { a: ["linux_musl_x86_64"] },
darwin_x86_64: { a: ["darwin_x86_64"] },
windows_x86: { a: ["windows_x86"] },
windows_x86_64: { a: ["windows_x86_64"] },
@@ -563,12 +568,12 @@
{
module: "foo",
variant: "linux_glibc_x86_64",
- property: []string{"root", "host", "linux", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"},
+ property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"},
},
{
module: "foo",
variant: "linux_glibc_x86",
- property: []string{"root", "host", "linux", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"},
+ property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"},
},
},
},
@@ -595,6 +600,23 @@
},
},
{
+ name: "linux_musl",
+ goOS: "linux",
+ preparer: FixtureModifyConfig(modifyTestConfigForMusl),
+ results: []result{
+ {
+ module: "foo",
+ variant: "linux_musl_x86_64",
+ property: []string{"root", "host", "linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_musl_x86_64", "linux_glibc_x86_64"},
+ },
+ {
+ module: "foo",
+ variant: "linux_musl_x86",
+ property: []string{"root", "host", "linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86", "lib32", "linux_x86", "linux_musl_x86", "linux_glibc_x86"},
+ },
+ },
+ },
+ {
name: "darwin",
goOS: "darwin",
results: []result{