From 46e4fad202f1bf18f2a1ee33ff70f61dd0e804a3 Mon Sep 17 00:00:00 2001 From: Ashutosh Agarwal Date: Tue, 27 Aug 2024 17:13:12 +0000 Subject: Add a property to rust_ffi targets to exclude them from APEXes. This is a temporary measure until stubs are properly supported by rust_ffi targets. Bug: 361441210 Bug: 362509506 Change-Id: Ieabd4e3abf442de660f39ec6c5776f5832b25e14 Test: manual --- rust/rust.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'rust/rust.go') diff --git a/rust/rust.go b/rust/rust.go index 3402adcc5..5a973c4e7 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -294,6 +294,15 @@ func (mod *Module) StaticExecutable() bool { return mod.StaticallyLinked() } +func (mod *Module) ApexExclude() bool { + if mod.compiler != nil { + if library, ok := mod.compiler.(libraryInterface); ok { + return library.apexExclude() + } + } + return false +} + func (mod *Module) Object() bool { // Rust has no modules which produce only object files. return false @@ -1863,6 +1872,10 @@ func (mod *Module) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Mo return false } + if rustDep, ok := dep.(*Module); ok && rustDep.ApexExclude() { + return false + } + return true } -- cgit v1.2.3-59-g8ed1b