diff options
author | Tor Lillqvist <tml@collabora.com> | 2020-09-24 19:42:14 +0100 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2020-09-24 22:36:22 +0200 |
commit | 03d5167455a5cbadfad9a2d5989574b1d1929857 (patch) | |
tree | 6c65d0fa9ae099ce56b5967ddb85cb809f1f0ecc /configure.ac | |
parent | 73f3028b501c72fb802aa15d0f450afd241e57c6 (diff) |
Use -flto=thin in gb_LTOFLAGS for Apple's Clang (for macOS and iOS)
Don't add any LTO flags into $CC and $CXX as we don't do that for
other platforms either. But maybe we should? Currently, with the
separate gb_LTOFLAGS, we have to handle each external project
separately to make it build with LTO.
Change-Id: I9761426585ebdfd976c74168218bd26bcc0e8517
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103351
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 11f1bc87e4ae..1ea6b255bb23 100644 --- a/configure.ac +++ b/configure.ac @@ -3001,9 +3001,6 @@ if test $_os = Darwin; then INSTALL_NAME_TOOL=install_name_tool if test -z "$save_CC"; then stdlib=-stdlib=libc++ - if test "$ENABLE_LTO" = TRUE; then - lto=-flto - fi AC_MSG_CHECKING([what C compiler to use]) CC="`xcrun -find clang`" @@ -3013,7 +3010,7 @@ if test $_os = Darwin; then else CC+=" -target arm64-apple-macos" fi - CC+=" $lto -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" + CC+=" -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" AC_MSG_RESULT([$CC]) AC_MSG_CHECKING([what C++ compiler to use]) @@ -3024,7 +3021,7 @@ if test $_os = Darwin; then else CXX+=" -target arm64-apple-macos" fi - CXX+=" $lto $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" + CXX+=" $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH" AC_MSG_RESULT([$CXX]) INSTALL_NAME_TOOL=`xcrun -find install_name_tool` @@ -3193,24 +3190,18 @@ if test $_os = iOS; then AC_MSG_RESULT($sysroot) - # LTO is not really recommended for iOS builds, - # the link time will be astronomical - if test "$ENABLE_LTO" = TRUE; then - lto=-flto - fi - stdlib="-stdlib=libc++" AC_MSG_CHECKING([what C compiler to use]) CC="`xcrun -find clang`" CC_BASE=`first_arg_basename "$CC"` - CC+=" -arch $host_cpu_for_clang -isysroot $sysroot $lto $versionmin" + CC+=" -arch $host_cpu_for_clang -isysroot $sysroot $versionmin" AC_MSG_RESULT([$CC]) AC_MSG_CHECKING([what C++ compiler to use]) CXX="`xcrun -find clang++`" CXX_BASE=`first_arg_basename "$CXX"` - CXX+=" -arch $host_cpu_for_clang $stdlib -isysroot $sysroot $lto $versionmin" + CXX+=" -arch $host_cpu_for_clang $stdlib -isysroot $sysroot $versionmin" AC_MSG_RESULT([$CXX]) INSTALL_NAME_TOOL=`xcrun -find install_name_tool` |