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:
Rémi Verschelde 2022-10-03 11:18:27 +02:00
parent d331b803b8
commit 82b87d7a17
5 changed files with 5 additions and 58 deletions

View file

@ -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=(