diff mbox series

misc: only build with lto if explicitly enabled

Message ID 20181026232538.GK28243@magnolia (mailing list archive)
State Accepted
Headers show
Series misc: only build with lto if explicitly enabled | expand

Commit Message

Darrick J. Wong Oct. 26, 2018, 11:25 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

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 <darrick.wong@oracle.com>
---
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Chinner Oct. 27, 2018, 1:45 a.m. UTC | #1
On Fri, Oct 26, 2018 at 04:25:38PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> 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.

> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  configure.ac |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 44a4b3a8..f8f29c07 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -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 <dchinner@redhat.com>
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 44a4b3a8..f8f29c07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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