aboutsummaryrefslogtreecommitdiffstats
path: root/apex
diff options
context:
space:
mode:
authorAlex Light2019-02-21 16:02:46 -0600
committerAlex Light2019-02-21 16:02:46 -0600
commit49ae3d981937f4a3c9bbbca9e281c874aa4f5e58 (patch)
tree7f201310183d979958b1f61b49475e9be05acea0 /apex
parent44df581457856fd23a4d78e6aed58e8ed9665d48 (diff)
downloadplatform-build-soong-49ae3d981937f4a3c9bbbca9e281c874aa4f5e58.tar.gz
platform-build-soong-49ae3d981937f4a3c9bbbca9e281c874aa4f5e58.tar.xz
platform-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) {
733 // indirect dependencies 733 // indirect dependencies
734 if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() && am.IsInstallableToApex() { 734 if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() && am.IsInstallableToApex() {
735 if cc, ok := child.(*cc.Module); ok { 735 if cc, ok := child.(*cc.Module); ok {
736 if cc.IsStubs() || cc.HasStubsVariants() { 736 if !a.Host() && (cc.IsStubs() || cc.HasStubsVariants()) {
737 // If the dependency is a stubs lib, don't include it in this APEX, 737 // If the dependency is a stubs lib, don't include it in this APEX,
738 // but make sure that the lib is installed on the device. 738 // but make sure that the lib is installed on the device.
739 // In case no APEX is having the lib, the lib is installed to the system 739 // In case no APEX is having the lib, the lib is installed to the system
740 // partition. 740 // partition.
741 //
742 // Always include if we are a host-apex however since those won't have any
743 // system libraries.
741 if !android.DirectlyInAnyApex(ctx, cc.Name()) && !android.InList(cc.Name(), a.externalDeps) { 744 if !android.DirectlyInAnyApex(ctx, cc.Name()) && !android.InList(cc.Name(), a.externalDeps) {
742 a.externalDeps = append(a.externalDeps, cc.Name()) 745 a.externalDeps = append(a.externalDeps, cc.Name())
743 } 746 }