Only output make targets for uninstallable static libs in the APEX
unavailable-to-platform case.
This removes the special case added in https://r.android.com/1274763
from SkipInstall(), so that it doesn't cause conflicting AndroidMk
entries when a cc_prebuilt_library_static module has prefer:true and
the corresponding source module exists.
Test: `m` in a tree with a snapshot created from art-module-sdk where
the libartimagevalues module has prefer:true
Bug: 151303681
Change-Id: I651ae325753b707296892adb4cae80daaddb6af2
diff --git a/cc/androidmk.go b/cc/androidmk.go
index e91b40a..ae8a16c 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -286,10 +286,8 @@
entries.SubName = "." + library.stubsVersion()
}
entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) {
- // Note library.skipInstall() has a special case to get here for static
- // libraries that otherwise would have skipped installation and hence not
- // have executed AndroidMkEntries at all. The reason is to ensure they get
- // a NOTICE file make target which other libraries might depend on.
+ // library.makeUninstallable() depends on this to bypass SkipInstall() for
+ // static libraries.
entries.SetBool("LOCAL_UNINSTALLABLE_MODULE", true)
if library.buildStubs() {
entries.SetBool("LOCAL_NO_NOTICE_FILE", true)