Add apex variants

Now, APEX-aware modules (the ones implementing android.ApexModule
interface) are created with multiple variants for each APEX that they
are included.

For example, if a module is included (either directly or indirectly -
via static linking) to two APEXs, the module is built separately for the
two APEXs (and of course separately for platform). This is a first step
to limit the symbol visibility to the modules built for APEXs; platform
private symbols and libs shouldn't be allowed for them.

In addition, the build system now tracks transitive dependencies of
the modules in APEXs. For example, if
native_shared_lib_modules:["libFoo"] then libFoo and its dependencies
are all automatically included to the APEX.

Bug: 112672359
Test: m apex.test; the built apex has additional libs (such as liblog,
libc++, ...) that are dependencies of the ones specified in Android.bp

Change-Id: Id9e3fc486dd4e7e36f8b6799dfb041868c5198d5
This commit is contained in:
Jiyong Park
2018-10-10 14:01:00 +09:00
parent 9d45299ba4
commit 48ca7dc535
2 changed files with 396 additions and 0 deletions

View File

@@ -336,6 +336,22 @@ bootstrap_go_package {
pluginFor: ["soong_build"],
}
bootstrap_go_package {
name: "soong-apex",
pkgPath: "android/soong/apex",
deps: [
"blueprint",
"soong",
"soong-android",
"soong-cc",
"soong-java",
],
srcs: [
"apex/apex.go",
],
pluginFor: ["soong_build"],
}
//
// Defaults to enable various configurations of host bionic
//