diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2011-12-07 19:13:39 +0059 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-11-01 04:37:04 +0100 |
commit | d4d1a7186594cc74b4bde0109e784868a200bbec (patch) | |
tree | 2706000bf517ae6eb814bfbba4f2288b2feb9cc0 | |
parent | 7feef65b6641adb7e6335984a5bce1c9e07d8fde (diff) | |
download | freetype-linaro_android_4.4.3.tar.gz |
freetype: Don't force -O2linaro_android_4.4.4linaro_android_4.4.3linaro_android_4.4.2linaro_android_4.4
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 02a9ced85..63a81cd19 100644 --- a/Android.mk +++ b/Android.mk @@ -53,7 +53,15 @@ LOCAL_SHARED_LIBRARIES += libpng libz # 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 |