From da9eff80a3e9042f335867436617f940e86dbf0d Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 8 Jan 2015 11:19:16 +0100 Subject: [PATCH 1/2] win: disable exception handling for all builds Previously exception handling was disabled in release builds, but enabled in debug builds. That makes no sense. PR-URL: https://github.com/iojs/io.js/pull/258 Reviewed-By: Ben Noordhuis --- common.gypi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index f8cc82ce0d6c..0a9008cc20d0 100644 --- a/common.gypi +++ b/common.gypi @@ -105,7 +105,6 @@ 'EnableFunctionLevelLinking': 'true', 'EnableIntrinsicFunctions': 'true', 'RuntimeTypeInfo': 'false', - 'ExceptionHandling': '0', 'AdditionalOptions': [ '/MP', # compile across multiple CPUs ], @@ -134,7 +133,7 @@ 'DebugInformationFormat': 3, # Generate a PDB 'WarningLevel': 3, 'BufferSecurityCheck': 'true', - 'ExceptionHandling': 1, # /EHsc + 'ExceptionHandling': 0, # /EHsc 'SuppressStartupBanner': 'true', 'WarnAsError': 'false', }, From 4519db0407e394170eee958920112f153c27912a Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 8 Jan 2015 11:23:59 +0100 Subject: [PATCH 2/2] win: disable stl exception usage Tell the stl that exception handling is unavailable. This avoids warnings like: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\ xlocale(337): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc PR-URL: https://github.com/iojs/io.js/pull/258 Reviewed-By: Ben Noordhuis --- common.gypi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.gypi b/common.gypi index 0a9008cc20d0..7072a83aab33 100644 --- a/common.gypi +++ b/common.gypi @@ -179,6 +179,8 @@ # ... or that C implementations shouldn't use # POSIX names '_CRT_NONSTDC_NO_DEPRECATE', + # Make sure the STL doesn't try to use exceptions + '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', 'BUILDING_UV_SHARED=1', ],