Bug 1186060 - Build with Visual Studio 2015 Update 1; r?ted, ehsan draft
authorGregory Szorc <gps@mozilla.com>
Thu, 10 Mar 2016 21:13:20 -0800
changeset 340033 01fa28d57f53278f8af1a24150ab11daf21440f6
parent 340032 74585a90d492bba3fbdef725bf7c7d57707cd5c5
child 340034 62d93df1226482ed0a284ad22359dc48d8b47600
push id12887
push usergszorc@mozilla.com
push dateMon, 14 Mar 2016 22:15:17 +0000
reviewersted, ehsan
bugs1186060
milestone48.0a1
Bug 1186060 - Build with Visual Studio 2015 Update 1; r?ted, ehsan This commit switches Windows builds from Visual Studio 2013 to Visual Studio 2015 Update 1. Previously, Visual Studio was installed on the builers as part of the base system image. Starting with this commit, we obtain Visual Studio from a pre-generated, self-contained archive containing the executables, Windows SDK, and other support files. This means that new Windows toolchains can be installed without having to modify configuration of machines in automation! The mozconfigs for Visual Studio 2015 are a bit different from existing mozconfigs. Because it appears to be completely redundant and not necessary, the LIBPATH variable has been dropped. The order of paths in PATH, LIB, and INCLUDE has changed. The new order more accurately reflects what would be defined by vcvarsall.bat. As part of switching to Visual Studio 2015, the Universal CRT is now required. So, the 2015 mozconfigs export WIN_UCRT_REDIST_DIR to define the location to those files. The switch to Visual Studio 2015 also involves the switch from the Windows 8.1 SDK to the Windows 10 SDK. However, we still target an old version of Windows, so this hopefully shouldn't have any significant fallout. It's worth noting that switching to Visual Studio 2015 makes builds - especially PGO builds - significantly faster. Our PGO build times in automation are ~1 hour faster. Our regular builds appear to be a few minutes faster. MozReview-Commit-ID: Pa5GW8V87Q
browser/config/mozconfigs/win32/common-opt
browser/config/mozconfigs/win32/debug
browser/config/mozconfigs/win32/l10n-mozconfig
browser/config/mozconfigs/win64/common-opt
browser/config/mozconfigs/win64/debug
browser/config/mozconfigs/win64/l10n-mozconfig
browser/config/tooltool-manifests/win32/releng.manifest
browser/config/tooltool-manifests/win64/releng.manifest
build/win32/mozconfig.vs2015-win64
build/win64/mozconfig.vs2015
js/src/devtools/automation/winbuildenv.sh
--- a/browser/config/mozconfigs/win32/common-opt
+++ b/browser/config/mozconfigs/win32/common-opt
@@ -22,17 +22,17 @@ fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 ac_add_options --with-mozilla-api-keyfile=/c/builds/mozilla-desktop-geoloc-api.key
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
-. $topsrcdir/build/win32/mozconfig.vs2013-win64
+. $topsrcdir/build/win32/mozconfig.vs2015-win64
 
 # Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
 ac_add_options --enable-warnings-as-errors
 
 # Enable Adobe Primetime CDM on 32-bit Windows in Mozilla builds.
 # Enabled here on the assumption that downstream vendors will not be using
 # these build configs.
 ac_add_options --enable-eme=adobe
--- a/browser/config/mozconfigs/win32/debug
+++ b/browser/config/mozconfigs/win32/debug
@@ -13,17 +13,17 @@ if [ -f /c/builds/google-oauth-api.key ]
 else
   _google_oauth_api_keyfile=/e/builds/google-oauth-api.key
 fi
 ac_add_options --with-google-oauth-api-keyfile=${_google_oauth_api_keyfile}
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
-. $topsrcdir/build/win32/mozconfig.vs2013-win64
+. $topsrcdir/build/win32/mozconfig.vs2015-win64
 
 # Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
 ac_add_options --enable-warnings-as-errors
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
--- a/browser/config/mozconfigs/win32/l10n-mozconfig
+++ b/browser/config/mozconfigs/win32/l10n-mozconfig
@@ -4,14 +4,14 @@ ac_add_options --enable-update-channel=$
 ac_add_options --enable-update-packaging
 ac_add_options --with-l10n-base=../../l10n
 ac_add_options --with-windows-version=603
 ac_add_options --with-branding=browser/branding/nightly
 
 export MOZILLA_OFFICIAL=1
 
 if test "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64"; then
-  . $topsrcdir/build/win32/mozconfig.vs2013-win64
+  . $topsrcdir/build/win32/mozconfig.vs2015-win64
 else
   . $topsrcdir/build/win32/mozconfig.vs2010
 fi
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/win64/common-opt
+++ b/browser/config/mozconfigs/win64/common-opt
@@ -23,17 +23,17 @@ ac_add_options --with-mozilla-api-keyfil
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 export MOZ_TELEMETRY_REPORTING=1
 
 # Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
 ac_add_options --enable-warnings-as-errors
 
-. $topsrcdir/build/win64/mozconfig.vs2013
+. $topsrcdir/build/win64/mozconfig.vs2015
 
 # Enable Adobe Primetime CDM on 64-bit Windows in Mozilla builds.
 # Enabled here on the assumption that downstream vendors will not be using
 # these build configs.
 ac_add_options --enable-eme=adobe
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
--- a/browser/config/mozconfigs/win64/debug
+++ b/browser/config/mozconfigs/win64/debug
@@ -23,14 +23,14 @@ export MOZILLA_OFFICIAL=1
 # Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
 ac_add_options --enable-warnings-as-errors
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 ac_add_options --with-branding=browser/branding/nightly
 
-. $topsrcdir/build/win64/mozconfig.vs2013
+. $topsrcdir/build/win64/mozconfig.vs2015
 
 . "$topsrcdir/build/mozconfig.rust"
 
 . "$topsrcdir/build/mozconfig.common.override"
 . "$topsrcdir/build/mozconfig.cache"
--- a/browser/config/mozconfigs/win64/l10n-mozconfig
+++ b/browser/config/mozconfigs/win64/l10n-mozconfig
@@ -4,11 +4,11 @@
 ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
 ac_add_options --enable-update-packaging
 ac_add_options --with-l10n-base=../../l10n
 ac_add_options --with-windows-version=603
 ac_add_options --with-branding=browser/branding/nightly
 
 export MOZILLA_OFFICIAL=1
 
-. $topsrcdir/build/win64/mozconfig.vs2013
+. $topsrcdir/build/win64/mozconfig.vs2015
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/tooltool-manifests/win32/releng.manifest
+++ b/browser/config/tooltool-manifests/win32/releng.manifest
@@ -13,10 +13,17 @@
 "unpack": true
 },
 {
 "size": 167175,
 "digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
 "algorithm": "sha512",
 "filename": "sccache.tar.bz2",
 "unpack": true
+},
+{
+"size": 330766639,
+"digest": "eca7f406def5f04093286c258567a8238070b71f7c45ca79338a765c70e19fa04257ecb00895d3182355ac9518e0a40773441c160a1c9ad52dd78b190b7cc4b0",
+"algorithm": "sha512",
+"filename": "vs2015u1.zip",
+"unpack": true
 }
 ]
--- a/browser/config/tooltool-manifests/win64/releng.manifest
+++ b/browser/config/tooltool-manifests/win64/releng.manifest
@@ -14,10 +14,17 @@
 "unpack": true
 },
 {
 "size": 167175,
 "digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
 "algorithm": "sha512",
 "filename": "sccache.tar.bz2",
 "unpack": true
+},
+{
+"size": 330766639,
+"digest": "eca7f406def5f04093286c258567a8238070b71f7c45ca79338a765c70e19fa04257ecb00895d3182355ac9518e0a40773441c160a1c9ad52dd78b190b7cc4b0",
+"algorithm": "sha512",
+"filename": "vs2015u1.zip",
+"unpack": true
 }
 ]
new file mode 100644
--- /dev/null
+++ b/build/win32/mozconfig.vs2015-win64
@@ -0,0 +1,19 @@
+vspath="$(cd ${topsrcdir} && pwd)/vs2015u1"
+
+export WINDOWSSDKDIR="${vspath}/SDK"
+export WIN32_REDIST_DIR="${vspath}/VC/redist/x86/Microsoft.VC140.CRT"
+export WIN_UCRT_REDIST_DIR="${vspath}/SDK/Redist/ucrt/DLLs/x86"
+
+export PATH="${vspath}/VC/bin/amd64_x86:${vspath}/VC/bin/amd64:${vspath}/VC/bin:${vspath}/SDK/bin/x86:${vspath}/SDK/bin/x64:${vspath}/DIASDK/bin:${PATH}"
+export PATH="${vspath}/VC/redist/x86/Microsoft.VC140.CRT:${vspath}/VC/redist/x64/Microsoft.VC140.CRT:${vspath}/SDK/Redist/ucrt/DLLs/x86:${vspath}/SDK/Redist/ucrt/DLLs/x64:${PATH}"
+
+export INCLUDE="${vspath}/VC/include:${vspath}/VC/atlmfc/include:${vspath}/SDK/Include/ucrt:${vspath}/SDK/Include/shared:${vspath}/SDK/Include/um:${vspath}/SDK/Include/winrt:${vspath}/DIASDK/include"
+export LIB="${vspath}/VC/lib:${vspath}/VC/atlmfc/lib:${vspath}/SDK/lib/ucrt/x86:${vspath}/SDK/lib/um/x86:${vspath}/DIASDK/lib"
+
+. $topsrcdir/build/mozconfig.vs-common
+
+mk_export_correct_style INCLUDE
+mk_export_correct_style LIB
+mk_export_correct_style PATH
+mk_export_correct_style WIN32_REDIST_DIR
+mk_export_correct_style WIN_UCRT_REDIST_DIR
new file mode 100644
--- /dev/null
+++ b/build/win64/mozconfig.vs2015
@@ -0,0 +1,18 @@
+vspath="$(cd ${topsrcdir} && pwd)/vs2015u1"
+
+export WINDOWSSDKDIR="${vspath}/SDK"
+export WIN32_REDIST_DIR=${vspath}/VC/redist/x64/Microsoft.VC140.CRT
+export WIN_UCRT_REDIST_DIR="${vspath}/SDK/Redist/ucrt/DLLs/x64"
+
+export PATH="${vspath}/VC/bin/amd64:${vspath}/VC/bin:${vspath}/SDK/bin/x64:${vspath}/VC/redist/x64/Microsoft.VC140.CRT:${vspath}/SDK/Redist/ucrt/DLLs/x64:${vspath}/DIASDK/bin/amd64:${PATH}"
+
+export INCLUDE="${vspath}/VC/include:${vspath}/VC/atlmfc/include:${vspath}/SDK/Include/ucrt:${vspath}/SDK/Include/shared:${vspath}/SDK/Include/um:${vspath}/SDK/Include/winrt:${vspath}/DIASDK/include"
+export LIB="${vspath}/VC/lib/amd64:${vspath}/VC/atlmfc/lib/amd64:${vspath}/SDK/lib/ucrt/x64:${vspath}/SDK/lib/um/x64:${vspath}/DIASDK/lib/amd64"
+
+. $topsrcdir/build/mozconfig.vs-common
+
+mk_export_correct_style INCLUDE
+mk_export_correct_style LIB
+mk_export_correct_style PATH
+mk_export_correct_style WIN32_REDIST_DIR
+mk_export_correct_style WIN_UCRT_REDIST_DIR
--- a/js/src/devtools/automation/winbuildenv.sh
+++ b/js/src/devtools/automation/winbuildenv.sh
@@ -12,19 +12,19 @@ topsrcdir="$SOURCE"
 # Windows mozconfigs overwrite them.
 export OLD_INCLUDE=$(IFS=';'; for d in $INCLUDE; do ( cd "$d" && echo -n $(pwd): ); done)
 export OLD_LIB=$(IFS=';'; for d in $LIB; do ( cd "$d" && echo -n $(pwd): ); done)
 export OLD_LIBPATH=$(IFS=';'; for d in $LIBPATH; do ( cd "$d" && echo -n $(pwd): ); done)
 
 # The various browser/config/mozconfigs/win32/* files use these checks to pick
 # the compiler.
 if $USE_64BIT; then
-  . $topsrcdir/build/win64/mozconfig.vs2013
+  . $topsrcdir/build/win64/mozconfig.vs2015
 elif test "$PROCESSOR_ARCHITECTURE" = "AMD64" -o "$PROCESSOR_ARCHITEW6432" = "AMD64"; then
-  . $topsrcdir/build/win32/mozconfig.vs2013-win64
+  . $topsrcdir/build/win32/mozconfig.vs2015-win64
 else
   . $topsrcdir/build/win32/mozconfig.vs2010
 fi
 
 # If PATH starts with a directory beginning with /d that does not
 # exist, it messes up cl.exe invocation (probably by passing in a
 # bogus option or something. I don't know why exactly.)
 export PATH="$(perl -le 'print join ":", grep { -d $_ } split ":", $ENV{PATH}')"