Bug 1220525 - Add -Zc:inline for MSVC build. r?ted draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 07 Jun 2016 19:55:26 +0900
changeset 377306 e798443fed59d4603e79a196b931421bcf91984e
parent 377169 3ccccf8e5036179a3178437cabc154b5e04b333d
child 523343 9e602aed77d54cee4e2e80e327d572a682164da4
push id20785
push userm_kato@ga2.so-net.ne.jp
push dateFri, 10 Jun 2016 02:09:11 +0000
reviewersted
bugs1220525
milestone50.0a1
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
js/src/old-configure.in
old-configure.in
--- 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