summaryrefslogtreecommitdiff
path: root/platform/android
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-05-20 16:47:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-05-20 16:51:20 +0200
commit4b20959d99645e591e5214a0883e31f29ef5a8a9 (patch)
treee23c7bbc33cd3ff28df05ef1ebc4da41154a90ea /platform/android
parent9643b2b6def9964a24d273e7611ebf5aeefcd4b5 (diff)
SCons: Keep exceptions and rtti on Android, iOS and HTML5 tools build
Those were disable to keep size small, and on Android avoid the dependency on the STL, but for tools build (editor) this is not really a concern. Note: as of today it's not possible to build tools=yes for those platforms, but this change is one of the necessary steps to enable it. Fixes #25262.
Diffstat (limited to 'platform/android')
-rw-r--r--platform/android/detect.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index ea70fefbc5..b7641172e4 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -214,13 +214,14 @@ def configure(env):
lib_sysroot = env["ANDROID_NDK_ROOT"] + "/platforms/" + env['ndk_platform'] + "/" + env['ARCH']
## Compile flags
-
- if env['android_stl']:
+ # Disable exceptions and rtti on non-tools (template) builds
+ if env['tools'] or env['android_stl']:
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++/include"])
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
env.Append(CXXFLAGS=['-frtti', "-std=gnu++14"])
else:
env.Append(CXXFLAGS=['-fno-rtti', '-fno-exceptions'])
+ # Don't use dynamic_cast, necessary with no-rtti.
env.Append(CPPFLAGS=['-DNO_SAFE_CAST'])
ndk_version = get_ndk_version(env["ANDROID_NDK_ROOT"])