summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-07-21 17:26:14 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-07-21 17:26:49 -0300
commit2b9902db06d922fc98ae49c0d1e31123feed469a (patch)
tree40cf433aedb97526053dbdeb192250ceedbe903e /platform/android
parentcfcb6e11f25adb13177ba08777263288a5ec6f61 (diff)
-Fix disable_3d flag
-Add extra flag optimize=[size,speed] to be able to prioritize size
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 971368db17..ada36e2814 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -139,8 +139,13 @@ def configure(env):
## Build type
if (env["target"].startswith("release")):
- env.Append(LINKFLAGS=['-O2'])
- env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
+ if (env["optimize"] == "speed"): #optimize for speed (default)
+ env.Append(LINKFLAGS=['-O2'])
+ env.Append(CPPFLAGS=['-O2', '-DNDEBUG', '-ffast-math', '-funsafe-math-optimizations', '-fomit-frame-pointer'])
+ else: #optimize for size
+ env.Append(CPPFLAGS=['-Os', '-DNDEBUG'])
+ env.Append(LINKFLAGS=['-Os'])
+
if (can_vectorize):
env.Append(CPPFLAGS=['-ftree-vectorize'])
if (env["target"] == "release_debug"):