Don't install rust modules that are never installable
rust modules that return false on EverInstallable don't get installed.
Currently, proc_macro modules are such ones.
Bug: 187810017
Test: m microdroid on aosp_arm64 and inspect that *.dylib.so files
from host x86_64 are not there.
Change-Id: Ia57289a04dbff6e4f2ce2733c60de5338305904c
diff --git a/rust/rust.go b/rust/rust.go
index f068b3d..46c8f25 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -619,6 +619,10 @@
}
func (mod *Module) installable(apexInfo android.ApexInfo) bool {
+ if !mod.EverInstallable() {
+ return false
+ }
+
// The apex variant is not installable because it is included in the APEX and won't appear
// in the system partition as a standalone file.
if !apexInfo.IsForPlatform() {