Tweak linux_glibc properties for musl builds in external/python/cpython3
For convenience, builds against musl libc currently use the
linux_glibc properties because they are almost always linux-specific
and not glibc-specific. In preparation for removing this hack,
tweak the linux_glibc properties by either moving them to host_linux,
which will apply to linux_glibc, linux_musl and linux_bionic, or
by setting appropriate musl or linux_musl properties. Properties
that must not be repeated while musl uses linux_musl and also still
uses the linux_glibc properties are moved to glibc properties, which
don't apply to musl. Whether these stay as glibc properties or get
moved back to linux_glibc later once the musl hack is removed is TBD.
Bug: 223257095
Test: m checkbuild
Test: m USE_HOST_MUSL=true host-native
Change-Id: If44954d3b047be6784e4782457fd0ea695f79484
diff --git a/Lib/Android.bp b/Lib/Android.bp
index 8656f5c..3b9c289 100644
--- a/Lib/Android.bp
+++ b/Lib/Android.bp
@@ -76,7 +76,11 @@
name: "py3-stdlib-force-build",
defaults_visibility: ["//visibility:private"],
target: {
- linux_glibc: {
+ glibc: {
+ exclude_srcs: [":py3-stdlib-prebuilt-srcs"],
+ srcs: [":py3-stdlib-srcs"],
+ },
+ musl: {
exclude_srcs: [":py3-stdlib-prebuilt-srcs"],
srcs: [":py3-stdlib-srcs"],
},
@@ -93,13 +97,13 @@
pkg_path: "stdlib",
host_supported: true,
target: {
- android: {
+ bionic: {
srcs: [":py3-stdlib-srcs"],
},
- linux_bionic: {
- srcs: [":py3-stdlib-srcs"],
+ glibc: {
+ srcs: [":py3-stdlib-prebuilt-srcs"],
},
- linux_glibc: {
+ musl: {
srcs: [":py3-stdlib-prebuilt-srcs"],
},
darwin: {