diff options
author | 2024-12-11 08:49:33 -0800 | |
---|---|---|
committer | 2024-12-11 08:49:33 -0800 | |
commit | c9237f7bb9887dee0d7412559df49d1ce7dddff0 (patch) | |
tree | 2f048756f7824934dd60b0aaa9b5edea7882fd2b /rust/rust.go | |
parent | 1f1e901cb1b9b4bbdcecb97a2c31cd620f0311f9 (diff) | |
parent | f7bbd2fe40e43f7fda7e08d08eeb9c2a93552ad9 (diff) |
Split DepIsInSameApex into outgoing and incoming am: f7bbd2fe40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3393290
Change-Id: Ia514f6b2e0bdc19f55a702d5942e8f7c909b44a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/rust/rust.go b/rust/rust.go index 1417c0881..64cfa40d2 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -1824,43 +1824,18 @@ func (mod *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext, sdkVer } // Implements android.ApexModule -func (mod *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { - depTag := ctx.OtherModuleDependencyTag(dep) - - if ccm, ok := dep.(*cc.Module); ok { - if ccm.HasStubsVariants() { - if cc.IsSharedDepTag(depTag) { - // dynamic dep to a stubs lib crosses APEX boundary - return false - } - if cc.IsRuntimeDepTag(depTag) { - // runtime dep to a stubs lib also crosses APEX boundary - return false - } - - if cc.IsHeaderDepTag(depTag) { - 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 - } - } - +func (mod *Module) OutgoingDepIsInSameApex(depTag blueprint.DependencyTag) bool { if depTag == procMacroDepTag || depTag == customBindgenDepTag { return false } - if rustDep, ok := dep.(*Module); ok && rustDep.ApexExclude() { - return false - } - return true } +func (mod *Module) IncomingDepIsInSameApex(depTag blueprint.DependencyTag) bool { + return !mod.ApexExclude() +} + // Overrides ApexModule.IsInstallabeToApex() func (mod *Module) IsInstallableToApex() bool { if mod.compiler != nil { |