summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-03 11:18:27 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-03 11:18:31 +0200
commit82b87d7a17c39617c7e84065250be77135077e81 (patch)
treed069e3ded79661351c5cf71bab3f23658d2555e7 /platform
parentd331b803b8e63b0dab406a12c21805a17ee0a6a8 (diff)
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)`.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/detect.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/platform/android/detect.py b/platform/android/detect.py
index e541aa0373..866131cbe3 100644
--- a/platform/android/detect.py
+++ b/platform/android/detect.py
@@ -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=(