Bug 1220525 - Add -Zc:inline for MSVC build. r?ted
-Zc:inliune introduces VS2013 update 2 to reduce build time.
https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/
On my workstation (i7-3770, 4 cores 8 threads), the build time by clean build (--enable-optimize and --disable-debug) is the following.
With -Zc:inline ... 39m44s
Without -Zc:inlune ... 43m52s
So we should use this option to improve build time.
MozReview-Commit-ID: GHUdgXBBYei
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -973,18 +973,18 @@ case "$target" in
WIN32_SUBSYSTEM_VERSION=6.01
fi
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
_USE_CPP_INCLUDE_FLAG=1
_DEFINES_CFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT'
_DEFINES_CXXFLAGS='-FI $(topobjdir)/js/src/js-confdefs.h -DMOZILLA_CLIENT'
- CFLAGS="$CFLAGS -W3 -Gy"
- CXXFLAGS="$CXXFLAGS -W3 -Gy"
+ CFLAGS="$CFLAGS -W3 -Gy -Zc:inline"
+ CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline"
if test "$CPU_ARCH" = "x86";then
dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
dnl more recent, so set that explicitly here unless another
dnl target arch has already been set.
if test -z `echo $CFLAGS | grep -i [-/]arch:` ; then
CFLAGS="$CFLAGS -arch:SSE2"
fi
if test -z `echo $CXXFLAGS | grep -i [-/]arch:` ; then
--- a/old-configure.in
+++ b/old-configure.in
@@ -1372,18 +1372,18 @@ case "$target" in
WIN32_SUBSYSTEM_VERSION=6.01
fi
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
DSO_LDOPTS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
_USE_CPP_INCLUDE_FLAG=1
_DEFINES_CFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT'
_DEFINES_CXXFLAGS='-FI $(topobjdir)/mozilla-config.h -DMOZILLA_CLIENT'
- CFLAGS="$CFLAGS -W3 -Gy"
- CXXFLAGS="$CXXFLAGS -W3 -Gy"
+ CFLAGS="$CFLAGS -W3 -Gy -Zc:inline"
+ CXXFLAGS="$CXXFLAGS -W3 -Gy -Zc:inline"
if test "$CPU_ARCH" = "x86"; then
dnl VS2012+ defaults to -arch:SSE2. We want to target nothing
dnl more recent, so set that explicitly here unless another
dnl target arch has already been set.
if test -z `echo $CFLAGS | grep -i [-/]arch:`; then
CFLAGS="$CFLAGS -arch:SSE2"
fi
if test -z `echo $CXXFLAGS | grep -i [-/]arch:`; then