Loading android/arch.go +19 −0 Original line number Diff line number Diff line Loading @@ -909,6 +909,7 @@ func createArchPropTypeDesc(props reflect.Type) []archPropTypeDesc { "Glibc", "Musl", "Linux", "Host_linux", "Not_windows", "Arm_on_x86", "Arm_on_x86_64", Loading @@ -930,6 +931,12 @@ func createArchPropTypeDesc(props reflect.Type) []archPropTypeDesc { targets = append(targets, target) } } if os.Linux() && os.Class == Host { target := "Host_linux_" + archType.Name if !InList(target, targets) { targets = append(targets, target) } } if os.Bionic() { target := "Bionic_" + archType.Name if !InList(target, targets) { Loading Loading @@ -1162,6 +1169,14 @@ func (m *ModuleBase) setOSProperties(ctx BottomUpMutatorContext) { } } if os.Linux() && os.Class == Host { field := "Host_linux" prefix := "target.host_linux" if linuxProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok { mergePropertyStruct(ctx, genProps, linuxProperties) } } if os.Bionic() { field := "Bionic" prefix := "target.bionic" Loading Loading @@ -2127,6 +2142,7 @@ func (m *ModuleBase) GetArchVariantProperties(ctx ArchVariantContext, propertySe linuxStructs := getTargetStructs(ctx, archProperties, "Linux") bionicStructs := getTargetStructs(ctx, archProperties, "Bionic") hostStructs := getTargetStructs(ctx, archProperties, "Host") hostLinuxStructs := getTargetStructs(ctx, archProperties, "Host_linux") hostNotWindowsStructs := getTargetStructs(ctx, archProperties, "Not_windows") // For android, linux, ... Loading @@ -2147,6 +2163,9 @@ func (m *ModuleBase) GetArchVariantProperties(ctx ArchVariantContext, propertySe if os.Bionic() { osStructs = append(osStructs, bionicStructs...) } if os.Linux() && os.Class == Host { osStructs = append(osStructs, hostLinuxStructs...) } if os == LinuxMusl { osStructs = append(osStructs, getTargetStructs(ctx, archProperties, "Musl")...) Loading android/arch_test.go +5 −4 Original line number Diff line number Diff line Loading @@ -510,6 +510,7 @@ func TestArchProperties(t *testing.T) { musl: { a: ["musl"] }, linux_bionic: { a: ["linux_bionic"] }, linux: { a: ["linux"] }, host_linux: { a: ["host_linux"] }, linux_glibc: { a: ["linux_glibc"] }, linux_musl: { a: ["linux_musl"] }, windows: { a: ["windows"], enabled: true }, Loading Loading @@ -566,12 +567,12 @@ func TestArchProperties(t *testing.T) { { module: "foo", variant: "linux_glibc_x86_64", property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"}, property: []string{"root", "host", "linux", "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", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"}, property: []string{"root", "host", "linux", "host_linux", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"}, }, }, }, Loading Loading @@ -605,12 +606,12 @@ func TestArchProperties(t *testing.T) { { 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"}, property: []string{"root", "host", "linux", "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"}, property: []string{"root", "host", "linux", "host_linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86", "lib32", "linux_x86", "linux_musl_x86", "linux_glibc_x86"}, }, }, }, Loading Loading
android/arch.go +19 −0 Original line number Diff line number Diff line Loading @@ -909,6 +909,7 @@ func createArchPropTypeDesc(props reflect.Type) []archPropTypeDesc { "Glibc", "Musl", "Linux", "Host_linux", "Not_windows", "Arm_on_x86", "Arm_on_x86_64", Loading @@ -930,6 +931,12 @@ func createArchPropTypeDesc(props reflect.Type) []archPropTypeDesc { targets = append(targets, target) } } if os.Linux() && os.Class == Host { target := "Host_linux_" + archType.Name if !InList(target, targets) { targets = append(targets, target) } } if os.Bionic() { target := "Bionic_" + archType.Name if !InList(target, targets) { Loading Loading @@ -1162,6 +1169,14 @@ func (m *ModuleBase) setOSProperties(ctx BottomUpMutatorContext) { } } if os.Linux() && os.Class == Host { field := "Host_linux" prefix := "target.host_linux" if linuxProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok { mergePropertyStruct(ctx, genProps, linuxProperties) } } if os.Bionic() { field := "Bionic" prefix := "target.bionic" Loading Loading @@ -2127,6 +2142,7 @@ func (m *ModuleBase) GetArchVariantProperties(ctx ArchVariantContext, propertySe linuxStructs := getTargetStructs(ctx, archProperties, "Linux") bionicStructs := getTargetStructs(ctx, archProperties, "Bionic") hostStructs := getTargetStructs(ctx, archProperties, "Host") hostLinuxStructs := getTargetStructs(ctx, archProperties, "Host_linux") hostNotWindowsStructs := getTargetStructs(ctx, archProperties, "Not_windows") // For android, linux, ... Loading @@ -2147,6 +2163,9 @@ func (m *ModuleBase) GetArchVariantProperties(ctx ArchVariantContext, propertySe if os.Bionic() { osStructs = append(osStructs, bionicStructs...) } if os.Linux() && os.Class == Host { osStructs = append(osStructs, hostLinuxStructs...) } if os == LinuxMusl { osStructs = append(osStructs, getTargetStructs(ctx, archProperties, "Musl")...) Loading
android/arch_test.go +5 −4 Original line number Diff line number Diff line Loading @@ -510,6 +510,7 @@ func TestArchProperties(t *testing.T) { musl: { a: ["musl"] }, linux_bionic: { a: ["linux_bionic"] }, linux: { a: ["linux"] }, host_linux: { a: ["host_linux"] }, linux_glibc: { a: ["linux_glibc"] }, linux_musl: { a: ["linux_musl"] }, windows: { a: ["windows"], enabled: true }, Loading Loading @@ -566,12 +567,12 @@ func TestArchProperties(t *testing.T) { { module: "foo", variant: "linux_glibc_x86_64", property: []string{"root", "host", "linux", "glibc", "linux_glibc", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_glibc_x86_64"}, property: []string{"root", "host", "linux", "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", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"}, property: []string{"root", "host", "linux", "host_linux", "glibc", "linux_glibc", "not_windows", "x86", "lib32", "linux_x86", "linux_glibc_x86"}, }, }, }, Loading Loading @@ -605,12 +606,12 @@ func TestArchProperties(t *testing.T) { { 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"}, property: []string{"root", "host", "linux", "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"}, property: []string{"root", "host", "linux", "host_linux", "musl", "linux_glibc", "linux_musl", "not_windows", "x86", "lib32", "linux_x86", "linux_musl_x86", "linux_glibc_x86"}, }, }, }, Loading