summaryrefslogtreecommitdiff
path: root/rust/rust.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2021-05-17 13:19:33 +0900
committer Jiyong Park <jiyong@google.com> 2021-05-17 13:27:20 +0900
commitbf8147ab66de4a2e7f1a349418b8eda82fb428f1 (patch)
tree45f8468d9cedb4c94145ea4f42a42ead17003bef /rust/rust.go
parent11bc0eef0ccea0aa776f929c85c28e48dd04d675 (diff)
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
Diffstat (limited to 'rust/rust.go')
-rw-r--r--rust/rust.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go
index f068b3d7b..46c8f250c 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -619,6 +619,10 @@ func (mod *Module) CoverageFiles() android.Paths {
}
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() {