summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorRuslan Mustakov <r.mustakov@gmail.com>2017-07-20 01:27:42 +0700
committerRuslan Mustakov <r.mustakov@gmail.com>2017-07-20 01:58:47 +0700
commitfbb27a0c43cb524b1bea79a3dad0e2f86a817b06 (patch)
tree6fb8bd1bdf5b7b12e2b71ff715060182f07723b8 /platform/android
parent45b498c4e056e313e06b169d64f991b32db30423 (diff)
Fix android export templates build
This commit fixes errors occurring during Android export template builds. This required modification in third-party library (libpng) to compile with NEON. Most likely a similar patch will be applied by them and we could then replace the modified version.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index 7508c9ed0e..55b7052393 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -87,20 +87,6 @@ def configure(env):
env['SPAWN'] = mySpawn
- ## 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 (can_vectorize):
- env.Append(CPPFLAGS=['-ftree-vectorize'])
- if (env["target"] == "release_debug"):
- env.Append(CPPFLAGS=['-DDEBUG_ENABLED'])
- elif (env["target"] == "debug"):
- env.Append(LINKFLAGS=['-O0'])
- env.Append(CPPFLAGS=['-O0', '-D_DEBUG', '-UNDEBUG', '-DDEBUG_ENABLED',
- '-DDEBUG_MEMORY_ENABLED', '-g', '-fno-limit-debug-info'])
-
## Architecture
if env['android_arch'] not in ['armv7', 'armv6', 'x86']:
@@ -133,6 +119,20 @@ def configure(env):
else:
env.extra_suffix = ".armv7" + env.extra_suffix
+ ## 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 (can_vectorize):
+ env.Append(CPPFLAGS=['-ftree-vectorize'])
+ if (env["target"] == "release_debug"):
+ env.Append(CPPFLAGS=['-DDEBUG_ENABLED'])
+ elif (env["target"] == "debug"):
+ env.Append(LINKFLAGS=['-O0'])
+ env.Append(CPPFLAGS=['-O0', '-D_DEBUG', '-UNDEBUG', '-DDEBUG_ENABLED',
+ '-DDEBUG_MEMORY_ENABLED', '-g', '-fno-limit-debug-info'])
+
## Compiler configuration
env['SHLIBSUFFIX'] = '.so'