rust: Add rust_toolchain_library module.
Adds a new rust_toolchain_library module, a module which can compute the
source path from the toolchain root.
Bug: 140642453
Test: m
Change-Id: I2d90722880279533eb93d2d946ac8c31fc0b1835
diff --git a/rust/rust.go b/rust/rust.go
index 3cc7868..de1d65e 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -577,7 +577,7 @@
func (mod *Module) CcLibrary() bool {
if mod.compiler != nil {
- if _, ok := mod.compiler.(*libraryDecorator); ok {
+ if _, ok := mod.compiler.(libraryInterface); ok {
return true
}
}
@@ -1542,7 +1542,7 @@
// Overrides ApexModule.IsInstallabeToApex()
func (mod *Module) IsInstallableToApex() bool {
if mod.compiler != nil {
- if lib, ok := mod.compiler.(*libraryDecorator); ok && (lib.shared() || lib.dylib()) {
+ if lib, ok := mod.compiler.(libraryInterface); ok && (lib.shared() || lib.dylib()) {
return true
}
if _, ok := mod.compiler.(*binaryDecorator); ok {