Mesa (master): scons: Tell MSVC STL library to not use exceptions.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sun Mar 22 08:23:37 UTC 2015


Module: Mesa
Branch: master
Commit: 357d1fc81aceec6dda866ea74962ee2ddf3aa350
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=357d1fc81aceec6dda866ea74962ee2ddf3aa350

Author: Jose Fonseca <jfonseca at vmware.com>
Date:   Fri Mar 20 06:27:59 2015 +0000

scons: Tell MSVC STL library to not use exceptions.

MSVC defaults to no exceptions unless /EH option is passed (which we don't), while
MSVC's STL defaults to use exceptions unless _HAS_EXCEPTIONS=0 is defined,
which we didn't.

This fixes

  warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 scons/gallium.py |    1 +
 1 file changed, 1 insertion(+)

diff --git a/scons/gallium.py b/scons/gallium.py
index b4018e7..2b11526 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -351,6 +351,7 @@ def generate(env):
                 '_SCL_SECURE_NO_WARNINGS',
                 '_SCL_SECURE_NO_DEPRECATE',
                 '_ALLOW_KEYWORD_MACROS',
+                '_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
             ]
         if env['build'] in ('debug', 'checked'):
             cppdefines += ['_DEBUG']




More information about the mesa-commit mailing list