summaryrefslogtreecommitdiff
path: root/cc/lto.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/lto.go')
-rw-r--r--cc/lto.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/lto.go b/cc/lto.go
index d2a43d27b..8b0880cf0 100644
--- a/cc/lto.go
+++ b/cc/lto.go
@@ -116,7 +116,8 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
// better dead code elimination and CFG simplification, but do
// not perform costly optimizations for a balance between compile
// time, binary size and performance.
- if !lto.ThinLTO() {
+ // Apply the same for Eng builds as well.
+ if !lto.ThinLTO() || ctx.Config().Eng() {
ltoLdFlags = append(ltoLdFlags, "-Wl,--lto-O0")
}