diff options
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rust/rust.go b/rust/rust.go index cd4bd4355..0c48154bb 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -427,6 +427,7 @@ type PathDeps struct { StaticLibs android.Paths ProcMacros RustLibraries AfdoProfiles android.Paths + LinkerDeps android.Paths // depFlags and depLinkFlags are rustc and linker (clang) flags. depFlags []string @@ -1692,7 +1693,7 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { } for _, lib := range deps.SharedLibs { - depTag := cc.SharedDepTag(mod.Static()) + depTag := cc.SharedDepTag() name, version := cc.StubsLibNameAndVersion(lib) variations := []blueprint.Variation{ @@ -1838,6 +1839,13 @@ func (mod *Module) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool return false } + if mod.Static() && cc.IsSharedDepTag(depTag) { + // shared_lib dependency from a static lib is considered as crossing + // the APEX boundary because the dependency doesn't actually is + // linked; the dependency is used only during the compilation phase. + return false + } + return true } |