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>
This commit is contained in:
Peter Foley
2016-01-18 14:19:51 -05:00
committed by Tor Lillqvist
parent 66603d539c
commit 817cd83cb7

View File

@@ -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