Clean up exception ahndling and rtti flags for msvc.

This commit is contained in:
Relintai 2022-10-09 10:41:24 +02:00
parent 7316ac8bd0
commit 47ee4c6415
2 changed files with 6 additions and 2 deletions

View File

@ -477,6 +477,10 @@ if selected_platform in platform_list:
env.Prepend(CXXFLAGS=["/EHs-"])
env.Prepend(CXXFLAGS=["/EHc-"])
env.Prepend(CXXFLAGS=["/EHr-"])
else:
if env.msvc:
env_base.Prepend(CXXFLAGS=["/EHsc"])
env.Prepend(CXXFLAGS=["/EHsc"])
# Handle renamed options.
if "use_lto" in ARGUMENTS or "use_thinlto" in ARGUMENTS:

View File

@ -192,7 +192,7 @@ def configure_msvc(env, manual_msvc_config):
env.Append(LINKFLAGS=["/OPT:REF"])
elif env["target"] == "debug":
env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od", "/EHsc"])
env.AppendUnique(CCFLAGS=["/Zi", "/FS", "/Od"])
# Allow big objects. Only needed for debug, see MinGW branch for rationale.
env.Append(LINKFLAGS=["/DEBUG"])
@ -215,7 +215,7 @@ def configure_msvc(env, manual_msvc_config):
else:
env.AppendUnique(CCFLAGS=["/MD"])
env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
env.AppendUnique(CCFLAGS=["/Gd", "/nologo"])
env.AppendUnique(CCFLAGS=["/utf-8"]) # Force to use Unicode encoding.
env.AppendUnique(CXXFLAGS=["/TP"]) # assume all sources are C++
# Once it was thought that only debug builds would be too large,