aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2019-07-15 15:31:16 +0900
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-07-17 03:10:19 +0000
commitb8650ff16bb7fe69370d38cb7002c7b0929067ed (patch)
treef3487ca0f2fb9057a00164619277496e9cc895a4 /apex
parent2c7b1c41cd603dece99e8e93f888b83650271e98 (diff)
downloadbuild_soong-b8650ff16bb7fe69370d38cb7002c7b0929067ed.tar.gz
build_soong-b8650ff16bb7fe69370d38cb7002c7b0929067ed.tar.bz2
build_soong-b8650ff16bb7fe69370d38cb7002c7b0929067ed.zip
Fix the unbundled mainline module build
This change fixes two problems: 1) the prebuilt apexes are force disabled for the unbundled builds because we need to build the modules from the source then 2) the dependencies from an sdk_library module to *.stubs.{public|system|tests} are not added for the unbundled build because the stubs modules are disabled. Bug: 137282010 Test: unbundled mainline builds are successful Test: build com.android.media and inspect the jar file to see if hiddenapi flags are there $ cd out/dist/mainline_modules_arm $ unzip com.android.media.apex apex_payload.img $ mkdir -p mnt $ sudo mount -o ro,loop apex_payload.img mnt $ dexdump2 mnt/javalib/updatable-media.jar | grep hiddenapi shows results Merged-In: I2c00af07aac4a15770d3acab011a36e2e4803bfc Change-Id: I2c00af07aac4a15770d3acab011a36e2e4803bfc (cherry picked from commit 53554e25593d6498a229d1dc89208aade4137008)
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 04b667f8..e5e58601 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1327,10 +1327,13 @@ func (p *Prebuilt) installable() bool {
}
func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) {
- // If the device is configured to use flattened APEX, don't set
- // p.properties.Source so that the prebuilt module (which is
- // a non-flattened APEX) is not used.
- forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild()
+ // If the device is configured to use flattened APEX, force disable the prebuilt because
+ // the prebuilt is a non-flattened one.
+ forceDisable := ctx.Config().FlattenApex()
+
+ // Force disable the prebuilts when we are doing unbundled build. We do unbundled build
+ // to build the prebuilts themselves.
+ forceDisable = forceDisable || !ctx.Config().UnbundledBuild()
// b/137216042 don't use prebuilts when address sanitizer is on
forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) ||