Commit d19db3dc by Reid Kleckner

Disable C++ exceptions in the Windows gn build

This avoids unnecessary destructor cleanups in swiftshader code. Posix systems use -fno-exceptions, so this updates the MSVC gn args with the equivalent, /EHs-c-. I noticed this while investigating an unrelated issue. Change-Id: Ic56e7560e7cb7617f8596b3ffda0444122425535 Reviewed-on: https://swiftshader-review.googlesource.com/14308Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarReid Kleckner <rnk@google.com>
parent 536ffccd
...@@ -21,12 +21,13 @@ config("swiftshader_config") { ...@@ -21,12 +21,13 @@ config("swiftshader_config") {
cflags = [ cflags = [
"/GS", # Detects some buffer overruns "/GS", # Detects some buffer overruns
"/Zc:wchar_t", "/Zc:wchar_t",
"/EHsc", "/EHs-c-", # Disable C++ exceptions
"/nologo", "/nologo",
"/Gd", # Default calling convention "/Gd", # Default calling convention
] ]
defines += [ defines += [
"_HAS_EXCEPTIONS=0", # Disable EH usage in STL headers
"_CRT_SECURE_NO_DEPRECATE", "_CRT_SECURE_NO_DEPRECATE",
"NOMINMAX", "NOMINMAX",
"_WINDLL", "_WINDLL",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment