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
This commit is contained in:
Jiyong Park
2021-05-17 13:19:33 +09:00
parent 11bc0eef0c
commit bf8147ab66

View File

@@ -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() {