diff options
Diffstat (limited to 'java/fuzz.go')
-rw-r--r-- | java/fuzz.go | 36 |
1 files changed, 11 insertions, 25 deletions
diff --git a/java/fuzz.go b/java/fuzz.go index 584c80b0c..d0f369f2f 100644 --- a/java/fuzz.go +++ b/java/fuzz.go @@ -50,37 +50,19 @@ type JavaFuzzLibrary struct { jniFilePaths android.Paths } -// IsSanitizerEnabled implemented to make JavaFuzzLibrary implement -// cc.Sanitizeable -func (j *JavaFuzzLibrary) IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizerName string) bool { - for _, s := range j.jniProperties.Sanitizers { - if sanitizerName == s { - return true - } - } - 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) { + // TODO: once b/231370928 is resolved, please uncomment the loop + // for _, s := range j.jniProperties.Sanitizers { + // if sanitizerName == s { + // return true + // } + // } + return false } -// 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 { @@ -189,6 +171,10 @@ func (s *javaFuzzPackager) GenerateBuildActions(ctx android.SingletonContext) { return } + if javaFuzzModule.Target().HostCross { + return + } + fuzzModuleValidator := fuzz.FuzzModule{ javaFuzzModule.ModuleBase, javaFuzzModule.DefaultableModuleBase, |