[cc_fuzz] Don't build infra-disable targets in m haiku.

`make haiku` shouldn't build fuzz targets that are disabled on the
continuous fuzzing infra. This should reduce pressure on the repackager.

Bug: N/A
Test: make haiku && verify that example_fuzzer isn't there.
Change-Id: I6a687a3ab8cbb1eb75113e96aba2c4f9f8058010
This commit is contained in:
Mitch Phillips 2020-02-24 08:26:20 -08:00 committed by Kris Alder
parent c822818147
commit 18e6719e9f

View file

@ -367,8 +367,6 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
return
}
s.fuzzTargets[module.Name()] = true
hostOrTargetString := "target"
if ccModule.Host() {
hostOrTargetString = "host"
@ -458,6 +456,17 @@ func (s *fuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
builder.Build(pctx, ctx, "create-"+fuzzZip.String(),
"Package "+module.Name()+" for "+archString+"-"+hostOrTargetString)
// Don't add modules to 'make haiku' that are set to not be exported to the
// fuzzing infrastructure.
if config := fuzzModule.Properties.Fuzz_config; config != nil {
if ccModule.Host() && !BoolDefault(config.Fuzz_on_haiku_host, true) {
return
} else if !BoolDefault(config.Fuzz_on_haiku_device, true) {
return
}
}
s.fuzzTargets[module.Name()] = true
archDirs[archOs] = append(archDirs[archOs], fileToZip{fuzzZip, ""})
})