Bug 1083616 - Build on clang-cl with MSVC 2013 with fallback emulation; r=gps
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 16 Oct 2014 21:40:22 -0400
changeset 210838 667e3bebacc711b772c846f2f1d96601cb1be642
parent 210837 7bf7b8aa8cf523f5e2d9a45ef17f7cf88a08dff3
child 210839 35da3c99e658095b737623ab8e543fb740f872a4
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgps
bugs1083616
milestone36.0a1
Bug 1083616 - Build on clang-cl with MSVC 2013 with fallback emulation; r=gps We officially test MSVC2013 builds now, so it makes sense to emulate the same compiler when building with clang-cl. Also, we need to build with fallback mode, since clang-cl doesn't still support SEH. We also need to pass these flags to NSS too for the same reason.
configure.in
--- a/configure.in
+++ b/configure.in
@@ -501,16 +501,21 @@ case "$target" in
         AC_SUBST(MSVS_VERSION)
         AC_SUBST(MSVC_C_RUNTIME_DLL)
         AC_SUBST(MSVC_CXX_RUNTIME_DLL)
 
         # Disable SEH on clang-cl because it doesn't implement them yet.
         if test -z "$CLANG_CL"; then
             AC_DEFINE(HAVE_SEH_EXCEPTIONS)
         else
+            # Build on clang-cl with MSVC 2013 with fallback emulation.
+            CFLAGS="$CFLAGS -fmsc-version=1800 -fallback"
+            CXXFLAGS="$CXXFLAGS -fmsc-version=1800 -fallback"
+            # Send our CFLAGS to NSS too
+            MOZ_CFLAGS_NSS=1
             AC_DEFINE_UNQUOTED(GTEST_HAS_SEH, 0)
         fi
 
         if test -n "$WIN32_REDIST_DIR"; then
           if test ! -d "$WIN32_REDIST_DIR"; then
             AC_MSG_ERROR([Invalid Win32 Redist directory: ${WIN32_REDIST_DIR}])
           fi
           WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd`