Merge "Use --lto-O0 for optimizeForSize targets" into main
This commit is contained in:
@@ -110,7 +110,7 @@ func (lto *lto) flags(ctx ModuleContext, flags Flags) Flags {
|
|||||||
var ltoLdFlags []string
|
var ltoLdFlags []string
|
||||||
|
|
||||||
// Do not perform costly LTO optimizations for Eng builds.
|
// Do not perform costly LTO optimizations for Eng builds.
|
||||||
if Bool(lto.Properties.Lto_O0) || ctx.Config().Eng() {
|
if Bool(lto.Properties.Lto_O0) || ctx.optimizeForSize() || ctx.Config().Eng() {
|
||||||
ltoLdFlags = append(ltoLdFlags, "-Wl,--lto-O0")
|
ltoLdFlags = append(ltoLdFlags, "-Wl,--lto-O0")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user