summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Ivan Lozano <ivanlozano@google.com> 2024-10-07 14:27:19 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-10-07 14:27:19 +0000
commit7adb62421c38a32c7512eec5e240140b3dac6c84 (patch)
treecb75a8ecaec9c7e29915ae89ae797b439f7a40b8 /rust/rust.go
parent8d7b58e50bfe110a4a58b471bb5ff333af0356ea (diff)
parent24cf036b51ab29df4417ee3e26d8261a7b82346d (diff)
Merge "rust: Don't produce apex variants if apex_exclude" into main
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index 5602edc79..a044a99dd 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -1756,6 +1756,16 @@ func (mod *Module) HostToolPath() android.OptionalPath {
var _ android.ApexModule = (*Module)(nil)
+// If a module is marked for exclusion from apexes, don't provide apex variants.
+// TODO(b/362509506): remove this once stubs are properly supported by rust_ffi targets.
+func (m *Module) CanHaveApexVariants() bool {
+ if m.ApexExclude() {
+ return false
+ } else {
+ return m.ApexModuleBase.CanHaveApexVariants()
+ }
+}
+
func (mod *Module) MinSdkVersion() string {
return String(mod.Properties.Min_sdk_version)
}