diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-12-07 19:13:39 +0059 |
---|---|---|
committer | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-11-14 13:35:11 +0100 |
commit | 02e897145035a0613908ef735cdbe87b5e4405b3 (patch) | |
tree | aafa46a7c54a54755923f15c6a2187d7aa99b4ec | |
parent | 77bda8b2dedbfa01b256979628fdbb10a679210b (diff) | |
download | freetype-linaro_android_4.2.2.tar.gz |
freetype: Don't force -O2linaro_android_4.3.1linaro_android_4.3linaro_android_4.2.2linaro_android_4.2.1linaro_android_4.2
There's a -O2 hardcode in Android.mk - its purpose is to make
sure freetype gets built with optimizations enabled, but it
is done in a way that overrides other optimization flags such
as -O3 or -Os.
Only set -O2 if no other optimization level is requested.
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | Android.mk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk index bc15d5c6d..08d0c49f2 100644 --- a/Android.mk +++ b/Android.mk @@ -49,7 +49,15 @@ LOCAL_CFLAGS += -fno-strict-aliasing # of the product #LOCAL_CFLAGS += "-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER" +# Freetype can't be built without optimizations, so we enforce -O2 if no +# other optimization flag is set - but we don't override what the global +# flags are saying if something else is given (-Os or -O3 are useful) +ifeq ($(findstring -O, $(TARGET_GLOBAL_CFLAGS)),) LOCAL_CFLAGS += -O2 +endif +ifneq ($(findstring -O0, $(TARGET_GLOBAL_CFLAGS)),) +LOCAL_CFLAGS += -O2 +endif LOCAL_MODULE:= libft2 |