[gnome-builder] build: clean up lto check
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build: clean up lto check
- Date: Fri, 8 May 2015 05:44:03 +0000 (UTC)
commit 49721017d190a5df7a767af04718ece5ecee5f1c
Author: Patrick Griffis <tingping tingping se>
Date: Fri May 8 01:15:37 2015 -0400
build: clean up lto check
- clang supports it
- ld takes -flto as a noop, remove it
- properly show when it is enabled but not supported
configure.ac | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 6370689..496d9a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,13 +295,9 @@ AS_IF([test "$enable_optimizations" != "no"],
[AX_CHECK_LINK_FLAG([-Wl,-Bsymbolic],
[OPTIMIZE_LDFLAGS="$OPTIMIZE_LDFLAGS -Wl,-Bsymbolic"])])
# Enable Link-Time-Optimization
-AS_IF([test "$enable_lto" = "yes"],
- [AS_IF([test "$c_compiler" = "gcc"],
- [
- AX_CHECK_COMPILE_FLAG([-flto], [OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS -flto"])
- AX_CHECK_LINK_FLAG([-flto], [OPTIMIZE_LDFLAGS="$OPTIMIZE_LDFLAGS -flto"])
- ],
- [AC_MSG_WARN([LTO is not yet available on your compiler.])])])
+AS_IF([test "$enable_lto" = "yes"], [
+ AX_CHECK_COMPILE_FLAG([-flto], [OPTIMIZE_CFLAGS="$OPTIMIZE_CFLAGS -flto"], [enable_lto=no])
+])
AC_SUBST(OPTIMIZE_CFLAGS)
AC_SUBST(OPTIMIZE_LDFLAGS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]