misc: only build with lto if explicitly enabled
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.
Signed-off-by Darrick J. Wong <[email protected]>
--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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) AC_SUBST(enable_lto) # Enable xfs_scrub build
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
Signed-off-by Darrick J. Wong <[email protected]>--- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)configure.ac +0
-0
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.
Reviewed-by Dave Chinner <[email protected]>
Signature · 2 lines
Dave Chinner [email protected]