summaryrefslogtreecommitdiff
path: root/rust/library.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-10-11 12:52:21 -0700
committer Colin Cross <ccross@android.com> 2024-11-05 14:31:14 -0800
commitb614cd441b355e48e59d1f5cd61a800103404151 (patch)
tree52631bc0f41419e8e6e251d9be1653599349c133 /rust/library.go
parent7ceb14aa4bb17638e3521ca11bd5c671e32adc50 (diff)
Verify that libraries in apexes don't link to implementations outside the apex
As part of removing some of the complexity in Soong around using stub vs. implementations for shared library dependencies a syntax will be added to Soong to allow explicitly selecting stubs vs. implementation. To avoid incorrect use, add a verification pass on apexes that ensure that all transitive implementation libraries used to link native libraries or binaries in the apex are themselves in the apex. Bug: 372543712 Test: TestApexVerifyNativeImplementationLibs Flag: EXEMPT host only Change-Id: I4aeaca00a359ce97e8f9efd2d8bffb8f9d2dc0df
Diffstat (limited to 'rust/library.go')
-rw-r--r--rust/library.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust/library.go b/rust/library.go
index 20cd2af7d..bd3359b6a 100644
--- a/rust/library.go
+++ b/rust/library.go
@@ -617,6 +617,9 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa
TableOfContents: android.OptionalPathForPath(tocFile),
SharedLibrary: outputFile,
Target: ctx.Target(),
+ // TODO: when rust supports stubs uses the stubs state rather than inferring it from
+ // apex_exclude.
+ IsStubs: Bool(library.Properties.Apex_exclude),
})
}