Add target.linux_glibc and target.bionic
target.linux_glibc will apply to host builds with glibc, which is
identical to the current target.linux. In a future change, target.linux
will change to affect all targets using the Linux kernel (android,
linux_bionic, and linux_glibc).
target.bionic will apply to all OS variants using Bionic.
Bug: 31559095
Test: Add target.linux_glibc, target.bionic sections to an Android.bp, build
Test: m host
Change-Id: I677a67c22fba148fec264132311e355283f9d88d
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 2db9d86..eb63065 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -155,7 +155,11 @@
}
if host {
- fmt.Fprintln(w, "LOCAL_MODULE_HOST_OS :=", ctx.Target().Os.String())
+ makeOs := ctx.Target().Os.String()
+ if ctx.Target().Os == android.Linux || ctx.Target().Os == android.LinuxBionic {
+ makeOs = "linux"
+ }
+ fmt.Fprintln(w, "LOCAL_MODULE_HOST_OS :=", makeOs)
fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
} else if ctx.vndk() {
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")