diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-02-22 01:31:38 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-02-22 01:31:38 +0000 |
commit | e91a07827117a26f4231eda6f58d24aa5ec70492 (patch) | |
tree | 84f44e74827a22fa7f58ac588819d64e50be3d0f | |
parent | 9be4152c2191b2bd489498252f6b61ac5b95e68b (diff) | |
parent | 49ae3d981937f4a3c9bbbca9e281c874aa4f5e58 (diff) | |
download | build_soong-e91a07827117a26f4231eda6f58d24aa5ec70492.tar.gz build_soong-e91a07827117a26f4231eda6f58d24aa5ec70492.tar.bz2 build_soong-e91a07827117a26f4231eda6f58d24aa5ec70492.zip |
Merge "Don't use stubs for host apexs"
-rw-r--r-- | apex/apex.go | 5 |
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()) } |