From e91ea2a94a118a52b45b67d5fe32125207f0454f Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 29 Mar 2022 20:46:35 -0700 Subject: [PATCH] Remove linux_glibc musl hack Stop using linux_glibc properties when musl is enabled. Bug: 223257095 Test: m USE_HOST_MUSL host-native -k Change-Id: I63cd485ef64c617bd81f3e598395da21bd71ccbb --- android/arch.go | 16 ---------------- android/arch_test.go | 4 ++-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/android/arch.go b/android/arch.go index 6b81022bf..f732a7dd0 100644 --- a/android/arch.go +++ b/android/arch.go @@ -1199,14 +1199,6 @@ func (m *ModuleBase) setOSProperties(ctx BottomUpMutatorContext) { if bionicProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok { mergePropertyStruct(ctx, genProps, bionicProperties) } - - // Special case: to ease the transition from glibc to musl, apply linux_glibc - // properties (which has historically mean host linux) to musl variants. - field = "Linux_glibc" - prefix = "target.linux_glibc" - if bionicProperties, ok := getChildPropertyStruct(ctx, targetProp, field, prefix); ok { - mergePropertyStruct(ctx, genProps, bionicProperties) - } } // Handle target OS properties in the form: @@ -1426,14 +1418,6 @@ func getArchProperties(ctx BaseMutatorContext, archProperties interface{}, arch if osArchProperties, ok := getChildPropertyStruct(ctx, targetProp, field, userFriendlyField); ok { result = append(result, osArchProperties) } - - // Special case: to ease the transition from glibc to musl, apply linux_glibc - // properties (which has historically mean host linux) to musl variants. - field = "Linux_glibc_" + archType.Name - userFriendlyField = "target.linux_glibc_" + archType.Name - if osArchProperties, ok := getChildPropertyStruct(ctx, targetProp, field, userFriendlyField); ok { - result = append(result, osArchProperties) - } } } diff --git a/android/arch_test.go b/android/arch_test.go index 68dc7f52a..dd0b11515 100644 --- a/android/arch_test.go +++ b/android/arch_test.go @@ -606,12 +606,12 @@ func TestArchProperties(t *testing.T) { { module: "foo", variant: "linux_musl_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"}, + property: []string{"root", "host", "linux", "host_linux", "musl", "linux_musl", "not_windows", "x86_64", "lib64", "linux_x86_64", "linux_musl_x86_64"}, }, { module: "foo", variant: "linux_musl_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"}, + property: []string{"root", "host", "linux", "host_linux", "musl", "linux_musl", "not_windows", "x86", "lib32", "linux_x86", "linux_musl_x86"}, }, }, },