aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-02-21 14:02:46 -0800
committerAlex Light <allight@google.com>2019-02-21 14:02:46 -0800
commit49ae3d981937f4a3c9bbbca9e281c874aa4f5e58 (patch)
tree7f201310183d979958b1f61b49475e9be05acea0 /apex
parent44df581457856fd23a4d78e6aed58e8ed9665d48 (diff)
downloadbuild_soong-49ae3d981937f4a3c9bbbca9e281c874aa4f5e58.tar.gz
build_soong-49ae3d981937f4a3c9bbbca9e281c874aa4f5e58.tar.bz2
build_soong-49ae3d981937f4a3c9bbbca9e281c874aa4f5e58.zip
Don't use stubs for host apexs
Host apexs don't have a system-image associated with them so we need to include all libraries, including those with stubs. Test: ./art/test/testrunner/run_build_test_target.py -j50 art-linux-bionic-x64-zipapex Bug: 125417922 Change-Id: Ie76e6a34e8be1057b29e2e005597c3e4b5fb1f9c
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 86393377..8f89ca6e 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -733,11 +733,14 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// indirect dependencies
if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() && am.IsInstallableToApex() {
if cc, ok := child.(*cc.Module); ok {
- if cc.IsStubs() || cc.HasStubsVariants() {
+ if !a.Host() && (cc.IsStubs() || cc.HasStubsVariants()) {
// If the dependency is a stubs lib, don't include it in this APEX,
// but make sure that the lib is installed on the device.
// In case no APEX is having the lib, the lib is installed to the system
// partition.
+ //
+ // Always include if we are a host-apex however since those won't have any
+ // system libraries.
if !android.DirectlyInAnyApex(ctx, cc.Name()) && !android.InList(cc.Name(), a.externalDeps) {
a.externalDeps = append(a.externalDeps, cc.Name())
}