Bug 1119072, Parts 1, 2, 4, 9, 17: Update build system to support MSVC 2015, r=glandium

This commit is contained in:
Brian Smith 2015-01-29 17:36:39 -08:00
parent 48d89c8c6b
commit c042df95a0
8 changed files with 74 additions and 3 deletions

View File

@ -25,6 +25,12 @@ ifdef MOZ_NO_DEBUG_RTL
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
ifdef MSVC_APPCRT_DLL
DEFINES += -DMSVC_APPCRT_DLL=$(MSVC_APPCRT_DLL)
endif
ifdef MSVC_DESKTOPCRT_DLL
DEFINES += -DMSVC_DESKTOPCRT_DLL=$(MSVC_DESKTOPCRT_DLL)
endif
endif
endif

View File

@ -74,6 +74,12 @@
#if MOZ_PACKAGE_MSVC_DLLS
@BINPATH@/@MSVC_C_RUNTIME_DLL@
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
#ifdef MSVC_APPCRT_DLL
@BINPATH@/@MSVC_APPCRT_DLL@
#endif
#ifdef MSVC_DESKTOPCRT_DLL
@BINPATH@/@MSVC_DESKTOPCRT_DLL@
#endif
#endif
#endif
#ifdef MOZ_SHARED_MOZGLUE

View File

@ -73,6 +73,12 @@ ifdef MOZ_NO_DEBUG_RTL
DEFINES += -DMOZ_PACKAGE_MSVC_DLLS=1
DEFINES += -DMSVC_C_RUNTIME_DLL=$(MSVC_C_RUNTIME_DLL)
DEFINES += -DMSVC_CXX_RUNTIME_DLL=$(MSVC_CXX_RUNTIME_DLL)
ifdef MSVC_APPCRT_DLL
DEFINES += -DMSVC_APPCRT_DLL=$(MSVC_APPCRT_DLL)
endif
ifdef MSVC_DESKTOPCRT_DLL
DEFINES += -DMSVC_DESKTOPCRT_DLL=$(MSVC_DESKTOPCRT_DLL)
endif
endif
endif

View File

@ -100,6 +100,12 @@
#if MOZ_PACKAGE_MSVC_DLLS
@BINPATH@/@MSVC_C_RUNTIME_DLL@
@BINPATH@/@MSVC_CXX_RUNTIME_DLL@
#ifdef MSVC_APPCRT_DLL
@BINPATH@/@MSVC_APPCRT_DLL@
#endif
#ifdef MSVC_DESKTOPCRT_DLL
@BINPATH@/@MSVC_DESKTOPCRT_DLL@
#endif
#endif
#endif
#ifndef MOZ_NATIVE_ICU

View File

@ -9,6 +9,8 @@ ifdef WIN32_REDIST_DIR
REDIST_FILES = \
$(MSVC_C_RUNTIME_DLL) \
$(MSVC_CXX_RUNTIME_DLL) \
$(MSVC_APPCRT_DLL) \
$(MSVC_DESKTOPCRT_DLL) \
$(NULL)
libs-preqs = \

View File

@ -496,6 +496,24 @@ case "$target" in
MSVS_VERSION=2013
MSVC_C_RUNTIME_DLL=msvcr120.dll
MSVC_CXX_RUNTIME_DLL=msvcp120.dll
elif test "$_CC_MAJOR_VERSION" = "19"; then
_CC_SUITE=14
MSVS_VERSION=2015
MSVC_C_RUNTIME_DLL=vcruntime140.dll
MSVC_CXX_RUNTIME_DLL=msvcp140.dll
MSVC_APPCRT_DLL=appcrt140.dll
MSVC_DESKTOPCRT_DLL=desktopcrt140.dll
# -Wv:18 disables all warnings introduced after VS2013
# See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx
CFLAGS="$CFLAGS -Wv:18"
CXXFLAGS="$CXXFLAGS -Wv:18"
# https://connect.microsoft.com/VisualStudio/feedback/details/888527/warnings-on-dbghelp-h
# for dbghelp.h, imagehlp.h, and shobj.h
# C4091: 'typedef ': ignored on left of '' when no variable is declared
CFLAGS="$CFLAGS -wd4091"
CXXFLAGS="$CXXFLAGS -wd4091"
else
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.
@ -504,6 +522,8 @@ See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
AC_SUBST(MSVS_VERSION)
AC_SUBST(MSVC_C_RUNTIME_DLL)
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
AC_SUBST(MSVC_APPCRT_DLL)
AC_SUBST(MSVC_DESKTOPCRT_DLL)
# Disable SEH on clang-cl because it doesn't implement them yet.
if test -z "$CLANG_CL"; then

View File

@ -419,9 +419,26 @@ case "$target" in
if test "$_CC_MAJOR_VERSION" = "18"; then
_CC_SUITE=12
MSVC_C_RUNTIME_DLL=msvcr120.dll
MSVC_CXX_RUNTIME_DLL=msvcp120.dll
elif test "$_CC_MAJOR_VERSION" = "19"; then
_CC_SUITE=14
MSVC_C_RUNTIME_DLL=vcruntime140.dll
MSVC_CXX_RUNTIME_DLL=msvcp140.dll
MSVC_APPCRT_DLL=appcrt140.dll
MSVC_DESKTOPCRT_DLL=desktopcrt140.dll
# -Wv:18 disables all warnings introduced after VS2013
# See http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx
CFLAGS="$CFLAGS -Wv:18"
CXXFLAGS="$CXXFLAGS -Wv:18"
else
AC_MSG_ERROR([This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
fi
AC_SUBST(MSVC_C_RUNTIME_DLL)
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
AC_SUBST(MSVC_APPCRT_DLL)
AC_SUBST(MSVC_DESKTOPCRT_DLL)
dnl Ensure that mt.exe is 'Microsoft (R) Manifest Tool',
dnl not something else like "magnetic tape manipulation utility".

View File

@ -66,9 +66,17 @@ JSSHELL_BINS = \
$(DIST)/bin/$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
$(NULL)
ifndef MOZ_NATIVE_NSPR
ifeq ($(_MSC_VER),1800)
JSSHELL_BINS += $(DIST)/bin/msvcr120.dll
JSSHELL_BINS += $(DIST)/bin/msvcp120.dll
ifdef MSVC_C_RUNTIME_DLL
JSSHELL_BINS += $(DIST)/bin/$(MSVC_C_RUNTIME_DLL)
endif
ifdef MSVC_CXX_RUNTIME_DLL
JSSHELL_BINS += $(DIST)/bin/$(MSVC_CXX_RUNTIME_DLL)
endif
ifdef MSVC_APPCRT_DLL
JSSHELL_BINS += $(DIST)/bin/$(MSVC_APPCRT_DLL)
endif
ifdef MSVC_DESKTOPCRT_DLL
JSSHELL_BINS += $(DIST)/bin/$(MSVC_DESKTOPCRT_DLL)
endif
ifdef MOZ_FOLD_LIBS
JSSHELL_BINS += $(DIST)/bin/$(DLL_PREFIX)nss3$(DLL_SUFFIX)