summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-01-18 14:19:51 -0500
committerTor Lillqvist <tml@collabora.com>2016-01-18 22:37:02 +0000
commit817cd83cb76582cda848da0370d3e1b68f5bbb01 (patch)
treed19aa55f1f28f5e82526e9212b818309852ffb8f /configure.ac
parent66603d539c73c0b08809d4ed6c5f6fde6f588a7e (diff)
Improve LTO flags on Android
Change-Id: Idd8a86710b9b93b317b28e092b5bee971645c346 Reviewed-on: https://gerrit.libreoffice.org/21583 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 6 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3e9e1c0ae2c2..7bdea6f7333b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -514,9 +514,13 @@ if test -n "$with_android_ndk"; then
esac
if test "$ENABLE_LTO" = TRUE; then
- # -flto comes from com_GCC_degs.mk, too, but we need to make sure it gets passed as part of
+ # -flto comes from com_GCC_defs.mk, too, but we need to make sure it gets passed as part of
# $CC and $CXX when building external libraries
- ANDROIDCFLAGS="$ANDROIDCFLAGS -flto"
+ if test "$COM_IS_CLANG" = TRUE; then
+ ANDROIDCFLAGS="$ANDROIDCFLAGS -flto"
+ else
+ ANDROIDCFLAGS="$ANDROIDCFLAGS -flto -fuse-linker-plugin -O2"
+ fi
fi
# gdbserver can be in different locations