Merge pull request #48053 from bruvzg/icu_no_except

Re-add "no-exceptions" for export templates builds with ICU.
This commit is contained in:
Rémi Verschelde 2021-04-20 22:35:39 +02:00 committed by GitHub
commit 38b25617fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -258,8 +258,10 @@ def configure(env):
env.Append(CPPFLAGS=["-isystem", env["ANDROID_NDK_ROOT"] + "/sources/cxx-stl/llvm-libc++abi/include"])
# Disable exceptions and rtti on non-tools (template) builds
if env["tools"] or env["builtin_icu"]:
if env["tools"]:
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.

View file

@ -95,8 +95,9 @@ def configure(env):
if env["initial_memory"] < 64:
print("Editor build requires at least 64MiB of initial memory. Forcing it.")
env["initial_memory"] = 64
elif env["builtin_icu"]:
env.Append(CCFLAGS=["-frtti"])
elif env["builtin_icu"]:
env.Append(CCFLAGS=["-fno-exceptions", "-frtti"])
else:
# Disable exceptions and rtti on non-tools (template) builds
# These flags help keep the file size down.