summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-16 13:00:25 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-16 13:06:06 +0300
commit253ffdf2b0c22247e6208e0881838b1896c63116 (patch)
tree8ebb94f8fd045d270f7d6ce2fcf31704aa1d0d16 /configure.ac
parent3ac1663a60926ab2f3fbbd1219455e37d5a83b45 (diff)
Pass -flto as part of CC and CXX when building external libs for Android
Using -flto and Clang still doesn't work, though, build stops already in fontconfig. The linker claims the expat library doesn't have an archive symbol table. Go figure, oh well, won't bother trying any more for now. Change-Id: Icbd65269e958665704104322e66a5b3a78fac75e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 44d432e577a0..eaa46b5c4e68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -391,6 +391,12 @@ 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
+ # $CC and $CXX when building external libraries
+ ANDROIDCFLAGS="$ANDROIDCFLAGS -flto"
+ fi
+
# gdbserver can be in different locations
if test -f $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver; then
ANDROID_NDK_GDBSERVER=$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver