diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-12-07 19:13:39 +0059 |
---|---|---|
committer | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-08-12 19:59:55 +0200 |
commit | 60daf428c7260e658812bb1e9eb2e13515de024e (patch) | |
tree | 64073e43e854d020e36825b0c056a7750b31b92e | |
parent | 0779a4845e0764ac06210942a9c456c534e67116 (diff) | |
download | freetype-linaro_android_4.1.2.tar.gz |
freetype: Don't force -O2linaro_android_4.1.2linaro_android_4.1.1
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 |