Restrict IsSanitizerEnabled() to android.Config().
Turns out, the whole context is not needed and then let's not
plumb it any further than necessary.
Test: Presubmits.
Change-Id: I1a25738e5a6ca20dea0d973c2ce435b5e152399b
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 42a112e..da15b59 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -1289,7 +1289,7 @@
type Sanitizeable interface {
android.Module
- IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizerName string) bool
+ IsSanitizerEnabled(config android.Config, sanitizerName string) bool
EnableSanitizer(sanitizerName string)
AddSanitizerDependencies(ctx android.BottomUpMutatorContext, sanitizerName string)
}
@@ -1427,7 +1427,7 @@
}
}
}
- } else if sanitizeable, ok := mctx.Module().(Sanitizeable); ok && sanitizeable.IsSanitizerEnabled(mctx, t.name()) {
+ } else if sanitizeable, ok := mctx.Module().(Sanitizeable); ok && sanitizeable.IsSanitizerEnabled(mctx.Config(), t.name()) {
// APEX fuzz modules fall here
sanitizeable.AddSanitizerDependencies(mctx, t.name())
mctx.CreateVariations(t.variationName())