Add LLNDK support for the VNDK

Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Test: Inspect out/soong/build.ninja before/after (w/o vndk)
Change-Id: Ic85f07fa10c695b5baab10c41f5e0ad38700bf3d
This commit is contained in:
Dan Willemsen
2017-03-19 13:44:32 -07:00
parent 86a1c7dd15
commit b916b80bf3
9 changed files with 233 additions and 23 deletions

View File

@@ -638,7 +638,7 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
variantNdkLibs := []string{}
variantLateNdkLibs := []string{}
if ctx.sdk() || ctx.vndk() {
if ctx.Os() == android.Android {
version := ctx.sdkVersion()
// Rewrites the names of shared libraries into the names of the NDK
@@ -655,12 +655,14 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
variantLibs := []string{}
nonvariantLibs := []string{}
for _, entry := range list {
if inList(entry, ndkPrebuiltSharedLibraries) {
if ctx.sdk() && inList(entry, ndkPrebuiltSharedLibraries) {
if !inList(entry, ndkMigratedLibs) {
nonvariantLibs = append(nonvariantLibs, entry+".ndk."+version)
} else {
variantLibs = append(variantLibs, entry+ndkLibrarySuffix)
}
} else if ctx.vndk() && inList(entry, config.LLndkLibraries()) {
nonvariantLibs = append(nonvariantLibs, entry+llndkLibrarySuffix)
} else {
nonvariantLibs = append(nonvariantLibs, entry)
}