From 10bbb018237b12fa78c968d447fce52593a8d07a Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 24 Mar 2022 15:59:08 -0700 Subject: [PATCH] Tweak linux_glibc properties for musl builds in system/core 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: I076fa026d7dddfccfa5cc395dd06bdc979eee1d8 --- libdiskconfig/Android.bp | 6 +----- libutils/Android.bp | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/libdiskconfig/Android.bp b/libdiskconfig/Android.bp index a3d643e2c..f523d4e70 100644 --- a/libdiskconfig/Android.bp +++ b/libdiskconfig/Android.bp @@ -27,12 +27,8 @@ cc_library { darwin: { enabled: false, }, - linux_glibc: { + host_linux: { cflags: [ - "-O2", - "-g", - "-W", - "-Wall", "-D_LARGEFILE64_SOURCE", ], }, diff --git a/libutils/Android.bp b/libutils/Android.bp index 58af8e47b..a9bd7d9b1 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -48,13 +48,11 @@ cc_library_headers { header_libs: ["libbacktrace_headers"], export_header_lib_headers: ["libbacktrace_headers"], }, - linux_glibc: { + host_linux: { header_libs: ["libbacktrace_headers"], export_header_lib_headers: ["libbacktrace_headers"], }, linux_bionic: { - header_libs: ["libbacktrace_headers"], - export_header_lib_headers: ["libbacktrace_headers"], enabled: true, }, windows: {