Skip to content
Snippets Groups Projects
Commit 6d2ea709 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Update the IPO support for GCC and CLANG.

Note that you may need to define "AR", "LD" and "RANLIB", if the names do not
match the default ones (clang/llvm are often trailed by version numbers).
parent 8af4a013
No related branches found
No related tags found
1 merge request!735Update the IPO support for GCC and CLANG.
......@@ -104,9 +104,17 @@ if test "$enable_ipo" = "yes"; then
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
CFLAGS="$CFLAGS -flto"
LDFLAGS="$LDFLAGS -flto"
AX_COMPARE_VERSION($ax_cv_c_compiler_version, [ge], [5.0.0],
[
: ${AR="gcc-ar"}
: ${RANLIB="gcc-ranlib"}
], [:] )
AC_MSG_RESULT([added GCC interprocedural optimization support])
elif test "$ax_cv_c_compiler_vendor" = "clang"; then
CFLAGS="$CFLAGS -emit-llvm"
CFLAGS="$CFLAGS -flto"
: ${AR="llvm-ar"}
: ${LD="llvm-ld"}
: ${RANLIB="llvm-ranlib"}
AC_MSG_RESULT([added LLVM interprocedural optimization support])
else
AC_MSG_WARN([Compiler does not support interprocedural optimization])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment