From f385b9af8f4c3358e5e15d6dbfdd1889c0360257 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 8 Mar 2022 15:12:48 -0800 Subject: Tweak linux_glibc properties for musl builds in external/rust/crates/android_log-sys 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: Ic692b12ec4ee369f70ed238ed727f1d7090f414c --- Android.bp | 4 ++++ cargo2android_glibc.bp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Android.bp b/Android.bp index 812d4e2..185de12 100644 --- a/Android.bp +++ b/Android.bp @@ -62,5 +62,9 @@ rust_library { // liblog is not added as a dependency for linux_glibc target enabled: false, }, + linux_musl: { + // liblog is not added as a dependency for linux_musl target + enabled: false, + }, }, } diff --git a/cargo2android_glibc.bp b/cargo2android_glibc.bp index f4d25cf..7d62503 100644 --- a/cargo2android_glibc.bp +++ b/cargo2android_glibc.bp @@ -3,4 +3,8 @@ target: { // liblog is not added as a dependency for linux_glibc target enabled: false, }, -} \ No newline at end of file + linux_musl: { + // liblog is not added as a dependency for linux_musl target + enabled: false, + }, +} -- cgit v1.2.3