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
This commit is contained in:
Dan Willemsen
2017-09-22 12:28:24 -07:00
parent 1596e6ee11
commit 866b563d4c
4 changed files with 75 additions and 8 deletions

View File

@@ -243,7 +243,11 @@ func translateAndroidMkModule(ctx blueprint.SingletonContext, w io.Writer, mod b
}
if host {
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_HOST_OS :=", amod.Os().String())
makeOs := amod.Os().String()
if amod.Os() == Linux || amod.Os() == LinuxBionic {
makeOs = "linux"
}
fmt.Fprintln(&data.preamble, "LOCAL_MODULE_HOST_OS :=", makeOs)
fmt.Fprintln(&data.preamble, "LOCAL_IS_HOST_MODULE := true")
}