diff options
author | 2024-08-27 17:13:12 +0000 | |
---|---|---|
committer | 2024-08-27 17:13:12 +0000 | |
commit | 46e4fad202f1bf18f2a1ee33ff70f61dd0e804a3 (patch) | |
tree | cf353ebb9422051ae40707978aff4cf7e781e733 /rust/library.go | |
parent | 4b98396c647e1b247c3b50ea723bfecac68a7789 (diff) |
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
Diffstat (limited to 'rust/library.go')
-rw-r--r-- | rust/library.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rust/library.go b/rust/library.go index 50d5a72ae..7db8f3691 100644 --- a/rust/library.go +++ b/rust/library.go @@ -70,6 +70,10 @@ type LibraryCompilerProperties struct { // Whether this library is part of the Rust toolchain sysroot. Sysroot *bool + + // Exclude this rust_ffi target from being included in APEXes. + // TODO(b/362509506): remove this once stubs are properly supported by rust_ffi targets. + Apex_exclude *bool } type LibraryMutatedProperties struct { @@ -122,6 +126,7 @@ type libraryInterface interface { shared() bool sysroot() bool source() bool + apexExclude() bool // Returns true if the build options for the module have selected a particular build type buildRlib() bool @@ -186,6 +191,10 @@ func (library *libraryDecorator) source() bool { return library.MutatedProperties.VariantIsSource } +func (library *libraryDecorator) apexExclude() bool { + return Bool(library.Properties.Apex_exclude) +} + func (library *libraryDecorator) buildRlib() bool { return library.MutatedProperties.BuildRlib && BoolDefault(library.Properties.Rlib.Enabled, true) } |