Loading cc/cc.go +5 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ type ModuleContextIntf interface { static() bool staticBinary() bool testBinary() bool testLibrary() bool header() bool binary() bool object() bool Loading Loading @@ -1486,6 +1487,10 @@ func (ctx *moduleContextImpl) testBinary() bool { return ctx.mod.testBinary() } func (ctx *moduleContextImpl) testLibrary() bool { return ctx.mod.testLibrary() } func (ctx *moduleContextImpl) header() bool { return ctx.mod.Header() } Loading cc/lto.go +3 −2 Original line number Diff line number Diff line Loading @@ -140,12 +140,13 @@ func (lto *lto) DefaultThinLTO(ctx BaseModuleContext) bool { lib32 := ctx.Arch().ArchType.Multilib == "lib32" // CFI enables full LTO. cfi := ctx.isCfi() // Performance and binary size are less important for host binaries. // Performance and binary size are less important for host binaries and tests. host := ctx.Host() test := ctx.testBinary() || ctx.testLibrary() // FIXME: ThinLTO for VNDK produces different output. // b/169217596 vndk := ctx.isVndk() return GlobalThinLTO(ctx) && !lto.Never() && !lib32 && !cfi && !host && !vndk return GlobalThinLTO(ctx) && !lto.Never() && !lib32 && !cfi && !host && !test && !vndk } func (lto *lto) FullLTO() bool { Loading Loading
cc/cc.go +5 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,7 @@ type ModuleContextIntf interface { static() bool staticBinary() bool testBinary() bool testLibrary() bool header() bool binary() bool object() bool Loading Loading @@ -1486,6 +1487,10 @@ func (ctx *moduleContextImpl) testBinary() bool { return ctx.mod.testBinary() } func (ctx *moduleContextImpl) testLibrary() bool { return ctx.mod.testLibrary() } func (ctx *moduleContextImpl) header() bool { return ctx.mod.Header() } Loading
cc/lto.go +3 −2 Original line number Diff line number Diff line Loading @@ -140,12 +140,13 @@ func (lto *lto) DefaultThinLTO(ctx BaseModuleContext) bool { lib32 := ctx.Arch().ArchType.Multilib == "lib32" // CFI enables full LTO. cfi := ctx.isCfi() // Performance and binary size are less important for host binaries. // Performance and binary size are less important for host binaries and tests. host := ctx.Host() test := ctx.testBinary() || ctx.testLibrary() // FIXME: ThinLTO for VNDK produces different output. // b/169217596 vndk := ctx.isVndk() return GlobalThinLTO(ctx) && !lto.Never() && !lib32 && !cfi && !host && !vndk return GlobalThinLTO(ctx) && !lto.Never() && !lib32 && !cfi && !host && !test && !vndk } func (lto *lto) FullLTO() bool { Loading