bug 1117900 - Explicitly require Update 3 for MSVC 2013. r=glandium

This commit is contained in:
Ted Mielczarek 2015-01-08 08:23:28 -05:00
parent a11c606b18
commit 9a6971c4f8
2 changed files with 16 additions and 5 deletions

View File

@ -15,7 +15,7 @@ cat <<EOF > conftest.c
#if defined(__clang__)
COMPILER clang-cl _MSC_VER
#else
COMPILER msvc _MSC_VER
COMPILER msvc _MSC_FULL_VER
#endif
#elif defined(__clang__)
COMPILER clang __clang_major__.__clang_minor__.__clang_patchlevel__
@ -55,6 +55,13 @@ rm -f conftest.out
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1
fi
if test "$compiler" = "msvc"; then
MSVC_VERSION_FULL="$CXX_VERSION"
CC_VERSION=`echo ${CC_VERSION} | cut -c 1-4`
CXX_VERSION=`echo ${CXX_VERSION} | cut -c 1-4`
fi
INTEL_CC=
INTEL_CXX=
if test "$compiler" = "icc"; then
@ -78,6 +85,7 @@ if test "$compiler" = "clang-cl"; then
# getting the right version here manually.
CC_VERSION=1800
CXX_VERSION=1800
MSVC_VERSION_FULL=180030723
# Build on clang-cl with MSVC 2013 with fallback emulation.
CFLAGS="$CFLAGS -fmsc-version=1800 -fallback"
CXXFLAGS="$CXXFLAGS -fmsc-version=1800 -fallback"

View File

@ -471,8 +471,9 @@ case "$target" in
changequote([,])
# Determine compiler version
_CC_MAJOR_VERSION=`echo ${CC_VERSION} | cut -c 1-2`
_CC_MINOR_VERSION=`echo ${CC_VERSION} | cut -c 3-4`
_CC_MAJOR_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 1-2`
_CC_MINOR_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 3-4`
_CC_BUILD_VERSION=`echo ${MSVC_VERSION_FULL} | cut -c 5-`
_MSC_VER=${CC_VERSION}
_CXX_MAJOR_VERSION=`echo ${CXX_VERSION} | cut -c 1-2`
@ -484,13 +485,15 @@ case "$target" in
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
if test "$_CC_MAJOR_VERSION" = "18"; then
if test "$_CC_MAJOR_VERSION" = "18" -a "$_CC_BUILD_VERSION" -ge "30723"; then
_CC_SUITE=12
MSVS_VERSION=2013
MSVC_C_RUNTIME_DLL=msvcr120.dll
MSVC_CXX_RUNTIME_DLL=msvcp120.dll
else
AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
AC_MSG_ERROR([This version (${_CC_MAJOR_VERSION}.${_CC_MINOR_VERSION}.${_CC_BUILD_VERSION}) of the MSVC compiler is unsupported.
You must install Visual C++ 2013 Update 3 or newer in order to build.
See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
fi
AC_SUBST(MSVS_VERSION)
AC_SUBST(MSVC_C_RUNTIME_DLL)