Skip to contentSkip to conversation

misc: only build with lto if explicitly enabled

PATCH In review Darrick J. Wong 2 participants 2 messages Oct 27, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: only build with lto if explicitly enabled

From: Darrick J. Wong <[email protected]>

Change the LTO default to off from probe because it wastes build time on developer machines. Anyone who really wants it for release builds or whatever can still turn it on.

---
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index 44a4b3a8..f8f29c07 100644
@@ -109,8 +109,8 @@ AC_ARG_ENABLE(threadsan,
 AC_SUBST(enable_threadsan)
 
 AC_ARG_ENABLE(lto,
-[ --enable-lto=[yes/no]      Enable link time optimization (LTO) [default=probe]],,
-	enable_lto=probe)
+[ --enable-lto=[yes/no]      Enable link time optimization (LTO) [default=no]],,
+	enable_lto=no)
 AC_SUBST(enable_lto)
 
 # Enable xfs_scrub build
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

Change the LTO default to off from probe because it wastes build time on developer machines. Anyone who really wants it for release builds or whatever can still turn it on.

Build time is not the problem. Making the resultant binary completely unusable with gdb and hence undebuggable is the real problem with LTO.

Quoted 10 lines
---
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +0 -0
index 44a4b3a8..f8f29c07 100644

configure.ac AC_ARG_ENABLE(threadsan, · line 113

Quoted 7 lines
configure.ac +2 -2
@@ -109,8 +109,8 @@ AC_ARG_ENABLE(threadsan,
 AC_SUBST(enable_threadsan)
 
 AC_ARG_ENABLE(lto,
-[ --enable-lto=[yes/no]      Enable link time optimization (LTO) [default=probe]],,
-	enable_lto=probe)
+[ --enable-lto=[yes/no]      Enable link time optimization (LTO) [default=no]],,
+	enable_lto=no)

Looks good.

Signature · 2 lines
Dave Chinner
[email protected]