Run apexDirectlyInAnyMutator even when module is disabled
`DirectlyInAnyApex` determines the additional flags that used to
generate stubs, with different flags for platform vs apex libraries.
Run this mutator even when `enabled` is false on the implementation
library, so that the stub variant gets the right flags.
Test: With https://r.android.com/3254299, lunch
aosp_panther_hwasan-trunk_staging-userdebug & m libbase
Test: presubmits
Bug: 366047774
Change-Id: I66b396a32dd85f47698ffcdadb944de8a11c022f
diff --git a/apex/apex.go b/apex/apex.go
index 0c56c30..80af9c5 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1312,9 +1312,6 @@
// See android.UpdateDirectlyInAnyApex
// TODO(jiyong): move this to android/apex.go?
func apexDirectlyInAnyMutator(mctx android.BottomUpMutatorContext) {
- if !mctx.Module().Enabled(mctx) {
- return
- }
if am, ok := mctx.Module().(android.ApexModule); ok {
android.UpdateDirectlyInAnyApex(mctx, am)
}