Disable cc_fuzz darwin host modules

am: eec9b286b0

Change-Id: I38e44d1a557c59ed4ab7bf812979e94a3b37b56a
This commit is contained in:
Colin Cross 2019-07-19 04:50:50 -07:00 committed by android-build-merger
commit 0ba21628ab
1 changed files with 14 additions and 0 deletions

View File

@ -102,5 +102,19 @@ func NewFuzz(hod android.HostOrDeviceSupported) *Module {
module.compiler = fuzz
module.linker = fuzz
module.installer = fuzz
// The fuzzer runtime is not present for darwin host modules, disable cc_fuzz modules when targeting darwin.
android.AddLoadHook(module, func(ctx android.LoadHookContext) {
disableDarwin := struct {
Target struct {
Darwin struct {
Enabled *bool
}
}
}{}
disableDarwin.Target.Darwin.Enabled = BoolPtr(false)
ctx.AppendProperties(&disableDarwin)
})
return module
}