Set ANDROID_HOST_MUSL for musl builds

Unlike glibc, musl does not #define __MUSL__ on the assumption that
building against musl will be done using a configure script that should
be testing for individual features rather than assuming them based on
using musl.  We don't use configure-based builds, so add a local
ANDROID_HOST_MUSL macro that will be defined for all host musl builds.

Bug: 190084016
Test: m USE_HOST_MUSL=true adb
Change-Id: I44e3ffd1d727fd0ea8b69c3b074fef7e92e2be41
This commit is contained in:
Colin Cross 2021-08-16 14:42:53 -07:00
parent a05a255eac
commit 7e7b028b88

View file

@ -45,6 +45,7 @@ var (
linuxMuslCflags = []string{
"-D_LIBCPP_HAS_MUSL_LIBC",
"-DANDROID_HOST_MUSL",
"-nostdlibinc",
}