Loading cc/cc.go +12 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ type ModuleContextIntf interface { isAfdoCompile() bool isPgoCompile() bool isCfi() bool isFuzzer() bool isNDKStubLibrary() bool useClangLld(actx ModuleContext) bool isForPlatform() bool Loading Loading @@ -1365,6 +1366,13 @@ func (c *Module) isCfi() bool { return false } func (c *Module) isFuzzer() bool { if sanitize := c.sanitize; sanitize != nil { return Bool(sanitize.Properties.SanitizeMutated.Fuzzer) } return false } func (c *Module) isNDKStubLibrary() bool { if _, ok := c.compiler.(*stubDecorator); ok { return true Loading Loading @@ -1660,6 +1668,10 @@ func (ctx *moduleContextImpl) isCfi() bool { return ctx.mod.isCfi() } func (ctx *moduleContextImpl) isFuzzer() bool { return ctx.mod.isFuzzer() } func (ctx *moduleContextImpl) isNDKStubLibrary() bool { return ctx.mod.isNDKStubLibrary() } Loading cc/lto.go +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ func (lto *lto) begin(ctx BaseModuleContext) { func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags { // TODO(b/131771163): Disable LTO when using explicit fuzzing configurations. // LTO breaks fuzzer builds. if inList("-fsanitize=fuzzer-no-link", flags.Local.CFlags) { if ctx.isFuzzer() { return flags } Loading Loading
cc/cc.go +12 −0 Original line number Diff line number Diff line Loading @@ -524,6 +524,7 @@ type ModuleContextIntf interface { isAfdoCompile() bool isPgoCompile() bool isCfi() bool isFuzzer() bool isNDKStubLibrary() bool useClangLld(actx ModuleContext) bool isForPlatform() bool Loading Loading @@ -1365,6 +1366,13 @@ func (c *Module) isCfi() bool { return false } func (c *Module) isFuzzer() bool { if sanitize := c.sanitize; sanitize != nil { return Bool(sanitize.Properties.SanitizeMutated.Fuzzer) } return false } func (c *Module) isNDKStubLibrary() bool { if _, ok := c.compiler.(*stubDecorator); ok { return true Loading Loading @@ -1660,6 +1668,10 @@ func (ctx *moduleContextImpl) isCfi() bool { return ctx.mod.isCfi() } func (ctx *moduleContextImpl) isFuzzer() bool { return ctx.mod.isFuzzer() } func (ctx *moduleContextImpl) isNDKStubLibrary() bool { return ctx.mod.isNDKStubLibrary() } Loading
cc/lto.go +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ func (lto *lto) begin(ctx BaseModuleContext) { func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags { // TODO(b/131771163): Disable LTO when using explicit fuzzing configurations. // LTO breaks fuzzer builds. if inList("-fsanitize=fuzzer-no-link", flags.Local.CFlags) { if ctx.isFuzzer() { return flags } Loading