You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
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.
(cherry picked from commit 4b20959d99)
This commit is contained in:
@@ -212,13 +212,15 @@ 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', '-DNO_SAFE_CAST'])
|
||||
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"])
|
||||
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("15.0.4075724"):
|
||||
|
||||
Reference in New Issue
Block a user