Make java_fuzz_host not implement Sanitizeable.
Also remove a tiny bit of state mutation from sanitizerMutator. Every
little bit helps!
Test: Prebuilts + comparing soong/build.ninja .
Your branch is up to date with 'aosp/master'.
Change-Id: I73b28b660b572610242765d87b70ab081b0b43df
diff --git a/java/fuzz.go b/java/fuzz.go
index 584c80b..cf2c981 100644
--- a/java/fuzz.go
+++ b/java/fuzz.go
@@ -50,9 +50,10 @@
jniFilePaths android.Paths
}
-// IsSanitizerEnabled implemented to make JavaFuzzLibrary implement
-// cc.Sanitizeable
-func (j *JavaFuzzLibrary) IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizerName string) bool {
+// IsSanitizerEnabledForJni implemented to make JavaFuzzLibrary implement
+// cc.JniSanitizeable. It returns a bool for whether a cc dependency should be
+// sanitized for the given sanitizer or not.
+func (j *JavaFuzzLibrary) IsSanitizerEnabledForJni(ctx android.BaseModuleContext, sanitizerName string) bool {
for _, s := range j.jniProperties.Sanitizers {
if sanitizerName == s {
return true
@@ -61,26 +62,6 @@
return false
}
-// IsSanitizerEnabledForJni implemented to make JavaFuzzLibrary implement
-// cc.JniSanitizeable. It returns a bool for whether a cc dependency should be
-// sanitized for the given sanitizer or not.
-func (j *JavaFuzzLibrary) IsSanitizerEnabledForJni(ctx android.BaseModuleContext, sanitizerName string) bool {
- return j.IsSanitizerEnabled(ctx, sanitizerName)
-}
-
-// EnableSanitizer implemented to make JavaFuzzLibrary implement
-// cc.Sanitizeable
-func (j *JavaFuzzLibrary) EnableSanitizer(sanitizerName string) {
-}
-
-// AddSanitizerDependencies implemented to make JavaFuzzLibrary implement
-// cc.Sanitizeable
-func (j *JavaFuzzLibrary) AddSanitizerDependencies(mctx android.BottomUpMutatorContext, sanitizerName string) {
-}
-
-// To verify that JavaFuzzLibrary implements cc.Sanitizeable
-var _ cc.Sanitizeable = (*JavaFuzzLibrary)(nil)
-
func (j *JavaFuzzLibrary) DepsMutator(mctx android.BottomUpMutatorContext) {
if len(j.jniProperties.Jni_libs) > 0 {
if j.fuzzPackagedModule.FuzzProperties.Fuzz_config == nil {