You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Remove unsupported NO_SAFE_CAST/-fno-rtti from Android build
Android was the last platform to still attempt to disable RTTI (for binary size), but both the Android editor and now the ICU library used by templates need RTTI. There could still be the possibility to support this for non-ICU template builds (i.e. without the TextServerAdvanced module), but since this isn't one of the build configurations we test regularly it's pretty risky to keep this option only for that specific use case. And our code is already littered with `dynamic_cast`s which weren't guarded with `!defined(NO_SAFE_CAST)`.
This commit is contained in:
@@ -156,15 +156,9 @@ def configure(env: "Environment"):
|
||||
env["RANLIB"] = compiler_path + "/llvm-ranlib"
|
||||
env["AS"] = compiler_path + "/clang"
|
||||
|
||||
# Disable exceptions and rtti on non-tools (template) builds
|
||||
if env.editor_build:
|
||||
env.Append(CXXFLAGS=["-frtti"])
|
||||
elif env["builtin_icu"]:
|
||||
env.Append(CXXFLAGS=["-frtti", "-fno-exceptions"])
|
||||
else:
|
||||
env.Append(CXXFLAGS=["-fno-rtti", "-fno-exceptions"])
|
||||
# Don't use dynamic_cast, necessary with no-rtti.
|
||||
env.Append(CPPDEFINES=["NO_SAFE_CAST"])
|
||||
# Disable exceptions on template builds
|
||||
if not env.editor_build:
|
||||
env.Append(CXXFLAGS=["-fno-exceptions"])
|
||||
|
||||
env.Append(
|
||||
CCFLAGS=(
|
||||
|
||||
Reference in New Issue
Block a user