summaryrefslogtreecommitdiff
path: root/apex/apex.go
diff options
context:
space:
mode:
Diffstat (limited to 'apex/apex.go')
-rw-r--r--apex/apex.go51
1 files changed, 22 insertions, 29 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 4fbec6026..002bf5be7 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -94,7 +94,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libcutils",
"libcutils_headers",
"libdiagnose_usb",
- "liblog",
"liblog_headers",
"libmdnssd",
"libminijail",
@@ -170,7 +169,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libicuuc_headers",
"libicuuc_stubdata",
"libjdwp_headers",
- "liblog",
"liblog_headers",
"liblz4",
"liblzma",
@@ -285,7 +283,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libsystem_headers",
"libtinyxml2",
"libudrv-uipc",
- "libutils",
"libutils_headers",
"libz",
"media_plugin_headers",
@@ -377,7 +374,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libtextclassifier_hash_headers",
"libtextclassifier_hash_static",
"libtflite_kernel_utils",
- "libutils",
"libutils_headers",
"philox_random",
"philox_random_headers",
@@ -522,7 +518,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libui",
"libui_headers",
"libunwindstack",
- "libutils",
"libutils_headers",
"libvibrator",
"libvorbisidec",
@@ -693,7 +688,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libui",
"libui_headers",
"libunwindstack",
- "libutils",
"libutils_headers",
"libvorbisidec",
"libvpx",
@@ -791,7 +785,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libjemalloc5",
"liblinker_main",
"liblinker_malloc",
- "liblog",
"liblog_headers",
"liblz4",
"liblzma",
@@ -824,7 +817,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libcutils_headers",
"libgtest_prod",
"libjsoncpp",
- "liblog",
"liblog_headers",
"libnativehelper_header_only",
"libnetd_client_headers",
@@ -840,7 +832,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libstatssocket_headers",
"libsystem_headers",
"libsysutils",
- "libutils",
"libutils_headers",
"netd_event_listener_interface-ndk_platform",
"server_configurable_flags",
@@ -866,13 +857,11 @@ func makeApexAvailableWhitelist() map[string][]string {
"libhidltransport-impl-internal",
"libhwbinder-impl-internal",
"libjsoncpp",
- "liblog",
"liblog_headers",
"libprocessgroup",
"libprocessgroup_headers",
"libsystem_headers",
"libtetherutilsjni",
- "libutils",
"libutils_headers",
"libvndksupport",
"tethering-aidl-interfaces-java",
@@ -919,7 +908,6 @@ func makeApexAvailableWhitelist() map[string][]string {
"libprotobuf-java-lite",
"libprotobuf-java-nano",
"libsystem_headers",
- "libutils",
"libutils_headers",
"libwifi-jni",
"net-utils-services-common",
@@ -1027,7 +1015,7 @@ func RegisterPreDepsMutators(ctx android.RegisterMutatorsContext) {
}
func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
- ctx.BottomUp("apex_deps", apexDepsMutator)
+ ctx.TopDown("apex_deps", apexDepsMutator)
ctx.BottomUp("apex", apexMutator).Parallel()
ctx.BottomUp("apex_flattened", apexFlattenedMutator).Parallel()
ctx.BottomUp("apex_uses", apexUsesMutator).Parallel()
@@ -1035,24 +1023,29 @@ func RegisterPostDepsMutators(ctx android.RegisterMutatorsContext) {
// Mark the direct and transitive dependencies of apex bundles so that they
// can be built for the apex bundles.
-func apexDepsMutator(mctx android.BottomUpMutatorContext) {
+func apexDepsMutator(mctx android.TopDownMutatorContext) {
+ var apexBundles []android.ApexInfo
+ var directDep bool
if a, ok := mctx.Module().(*apexBundle); ok && !a.vndkApex {
- apexBundleName := mctx.ModuleName()
- mctx.WalkDeps(func(child, parent android.Module) bool {
- depName := mctx.OtherModuleName(child)
- // If the parent is apexBundle, this child is directly depended.
- _, directDep := parent.(*apexBundle)
- android.UpdateApexDependency(apexBundleName, depName, directDep)
-
- if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() &&
- (directDep || am.DepIsInSameApex(mctx, child)) {
- am.BuildForApex(apexBundleName)
- return true
- } else {
- return false
- }
- })
+ apexBundles = []android.ApexInfo{{mctx.ModuleName(), proptools.Bool(a.properties.Legacy_android10_support)}}
+ directDep = true
+ } else if am, ok := mctx.Module().(android.ApexModule); ok {
+ apexBundles = am.ApexVariations()
+ directDep = false
}
+
+ if len(apexBundles) == 0 {
+ return
+ }
+
+ mctx.VisitDirectDeps(func(child android.Module) {
+ depName := mctx.OtherModuleName(child)
+ if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() &&
+ (directDep || am.DepIsInSameApex(mctx, child)) {
+ android.UpdateApexDependency(apexBundles, depName, directDep)
+ am.BuildForApexes(apexBundles)
+ }
+ })
}
// Create apex variations if a module is included in APEX(s).