Use one mutator for all bp2build conversion.
Each conversion required defining a separate mutator, which will each
operate on _all_ modules and requires each to repeat checks whether the
mutator should operator. Instead, we introduce a single mutator and
modules can define a ConvertWithBp2build to implement bp2build
conversion for that module.
Test: bp2build.sh
Bug: 183079158
Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
diff --git a/cc/fuzz.go b/cc/fuzz.go
index e987fe4..23d81d6 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -52,6 +52,10 @@
installedSharedDeps []string
}
+func (fuzz *fuzzBinary) fuzzBinary() bool {
+ return true
+}
+
func (fuzz *fuzzBinary) linkerProps() []interface{} {
props := fuzz.binaryDecorator.linkerProps()
props = append(props, &fuzz.fuzzPackagedModule.FuzzProperties)
@@ -234,7 +238,7 @@
}
func NewFuzz(hod android.HostOrDeviceSupported) *Module {
- module, binary := NewBinary(hod)
+ module, binary := newBinary(hod, false)
binary.baseInstaller = NewFuzzInstaller()
module.sanitize.SetSanitizer(Fuzzer, true)