diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-12-07 19:13:39 +0059 |
---|---|---|
committer | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-12-07 19:13:39 +0059 |
commit | b3dce6879fa12bc727705544821d317bc43eeb7c (patch) | |
tree | 392396b998e612ad8b8bf5d59d660750cfbcde2e | |
parent | b0bd6f4a38bc7e9723b7400f82ec111a4953e1b8 (diff) | |
download | freetype-linaro_android_4.0.3.tar.gz |
freetype: Don't force -O2linaro_android_4.0.4linaro_android_4.0.3linaro_android_4.0.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 7a9296410..916b005a6 100644 --- a/Android.mk +++ b/Android.mk @@ -47,7 +47,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 |