зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570598 - Use a common setup file for Visual Studio in toolchain scripts. r=nalexander
This has the side effect of making gn a 64-bits binary. Keeping it 32-bits is not worth the effort. Differential Revision: https://phabricator.services.mozilla.com/D40186
This commit is contained in:
Родитель
7c09816a13
Коммит
e2daeefe33
|
@ -44,7 +44,7 @@ macosx64-gn:
|
|||
|
||||
win32-gn:
|
||||
treeherder:
|
||||
symbol: TW32(gn)
|
||||
symbol: TW64(gn)
|
||||
worker-type: b-win2012
|
||||
worker:
|
||||
max-run-time: 3600
|
||||
|
|
|
@ -11,14 +11,9 @@ Linux)
|
|||
MINGW*)
|
||||
WORKSPACE=$PWD
|
||||
UPLOAD_DIR=$WORKSPACE/public/build
|
||||
WIN_WORKSPACE="$(pwd -W)"
|
||||
COMPRESS_EXT=bz2
|
||||
|
||||
export INCLUDE="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/ucrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/shared;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/um;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/winrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/include"
|
||||
|
||||
export LIB="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/um/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/ucrt/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/lib/amd64"
|
||||
|
||||
PATH="$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx64/x64:$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx86/x86:$WORKSPACE/build/src/vs2017_15.8.4/SDK/bin/10.0.17134.0/x64:$WORKSPACE/build/src/vs2017_15.8.4/redist/x64/Microsoft.VC141.CRT:$WORKSPACE/build/src/vs2017_15.8.4/SDK/Redist/ucrt/DLLs/x64:$WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/bin/amd64:$WORKSPACE/build/src/mingw64/bin:$PATH"
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
|
||||
|
||||
export CC=clang-cl
|
||||
;;
|
||||
|
|
|
@ -19,23 +19,11 @@ cd $GECKO_PATH
|
|||
./mach artifact toolchain -v --authentication-file="${TOOLTOOL_AUTH_FILE}" --tooltool-manifest "${TOOLTOOL_MANIFEST}"${TOOLTOOL_CACHE:+ --cache-dir ${TOOLTOOL_CACHE}}${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}}
|
||||
|
||||
# Set up all the Visual Studio paths.
|
||||
MSVC_DIR=vs2017_15.8.4
|
||||
VSWINPATH="$(cd ${MSVC_DIR} && pwd)"
|
||||
|
||||
echo vswinpath ${VSWINPATH}
|
||||
. taskcluster/scripts/misc/vs-setup.sh
|
||||
|
||||
# LLVM_ENABLE_DIA_SDK is set if the directory "$ENV{VSINSTALLDIR}DIA SDK"
|
||||
# exists.
|
||||
export VSINSTALLDIR="${VSWINPATH}/"
|
||||
|
||||
export WINDOWSSDKDIR="${VSWINPATH}/SDK"
|
||||
export WIN32_REDIST_DIR="${VSWINPATH}/VC/redist/x64/Microsoft.VC141.CRT"
|
||||
export WIN_UCRT_REDIST_DIR="${VSWINPATH}/SDK/Redist/ucrt/DLLs/x64"
|
||||
|
||||
export PATH="${VSWINPATH}/VC/bin/Hostx64/x64:${VSWINPATH}/SDK/bin/10.0.17134.0/x64:${VSWINPATH}/VC/redist/x64/Microsoft.VC141.CRT:${VSWINPATH}/SDK/Redist/ucrt/DLLs/x64:${VSWINPATH}/DIA SDK/bin/amd64:${PATH}"
|
||||
|
||||
export INCLUDE="${VSWINPATH}/VC/include:${VSWINPATH}/VC/atlmfc/include:${VSWINPATH}/SDK/Include/10.0.17134.0/ucrt:${VSWINPATH}/SDK/Include/10.0.17134.0/shared:${VSWINPATH}/SDK/Include/10.0.17134.0/um:${VSWINPATH}/SDK/Include/10.0.17134.0/winrt:${VSWINPATH}/DIA SDK/include"
|
||||
export LIB="${VSWINPATH}/VC/lib/x64:${VSWINPATH}/VC/atlmfc/lib/x64:${VSWINPATH}/SDK/Lib/10.0.17134.0/ucrt/x64:${VSWINPATH}/SDK/Lib/10.0.17134.0/um/x64:${VSWINPATH}/DIA SDK/lib/amd64"
|
||||
export VSINSTALLDIR="${VSPATH}/"
|
||||
|
||||
# Add git.exe to the path
|
||||
export PATH="$(pwd)/cmd:${PATH}"
|
||||
|
|
|
@ -7,18 +7,12 @@ WORKSPACE=$PWD
|
|||
UPLOAD_DIR=$WORKSPACE/public/build
|
||||
COMPRESS_EXT=bz2
|
||||
|
||||
VSPATH="$WORKSPACE/build/src/vs2017_15.8.4"
|
||||
|
||||
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/10.0.17134.0/ucrt:${VSPATH}/SDK/Include/10.0.17134.0/shared:${VSPATH}/SDK/Include/10.0.17134.0/um:${VSPATH}/SDK/Include/10.0.17134.0/winrt:${VSPATH}/DIA SDK/include"
|
||||
export LIB="${VSPATH}/VC/lib/x86:${VSPATH}/VC/atlmfc/lib/x86:${VSPATH}/SDK/lib/10.0.17134.0/ucrt/x86:${VSPATH}/SDK/lib/10.0.17134.0/um/x86:${VSPATH}/DIA SDK/lib"
|
||||
|
||||
export PATH="$WORKSPACE/build/src/ninja/bin:$PATH"
|
||||
export PATH="$WORKSPACE/build/src/mingw64/bin:$PATH"
|
||||
export PATH="${VSPATH}/VC/bin/Hostx64/x86:${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/VC/bin/Hostx86/x86:${VSPATH}/SDK/bin/10.0.17134.0/x64:${VSPATH}/DIA SDK/bin:${PATH}"
|
||||
export PATH="${VSPATH}/VC/redist/x86/Microsoft.VC141.CRT:${VSPATH}/SDK/Redist/ucrt/DLLs/x86:${PATH}"
|
||||
|
||||
cd $WORKSPACE/build/src
|
||||
|
||||
. taskcluster/scripts/misc/vs-setup.sh
|
||||
. taskcluster/scripts/misc/tooltool-download.sh
|
||||
. taskcluster/scripts/misc/build-gn-common.sh
|
||||
|
||||
|
|
|
@ -14,14 +14,9 @@ Linux)
|
|||
MINGW*)
|
||||
WORKSPACE=$PWD
|
||||
UPLOAD_DIR=$WORKSPACE/public/build
|
||||
WIN_WORKSPACE="$(pwd -W)"
|
||||
COMPRESS_EXT=bz2
|
||||
|
||||
export INCLUDE="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/ucrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/shared;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/um;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/winrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/include"
|
||||
|
||||
export LIB="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/um/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/ucrt/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/lib/amd64"
|
||||
|
||||
PATH="$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx64/x64:$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx86/x86:$WORKSPACE/build/src/vs2017_15.8.4/SDK/bin/10.0.17134.0/x64:$WORKSPACE/build/src/vs2017_15.8.4/redist/x64/Microsoft.VC141.CRT:$WORKSPACE/build/src/vs2017_15.8.4/SDK/Redist/ucrt/DLLs/x64:$WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/bin/amd64:$WORKSPACE/build/src/mingw64/bin:$PATH"
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -12,14 +12,9 @@ Linux)
|
|||
MINGW*)
|
||||
WORKSPACE=$PWD
|
||||
UPLOAD_DIR=$WORKSPACE/public/build
|
||||
WIN_WORKSPACE="$(pwd -W)"
|
||||
COMPRESS_EXT=bz2
|
||||
|
||||
export INCLUDE="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/ucrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/shared;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/um;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/winrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/include"
|
||||
|
||||
export LIB="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/um/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/ucrt/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/lib/amd64"
|
||||
|
||||
PATH="$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx64/x64:$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx86/x86:$WORKSPACE/build/src/vs2017_15.8.4/SDK/bin/10.0.17134.0/x64:$WORKSPACE/build/src/vs2017_15.8.4/redist/x64/Microsoft.VC141.CRT:$WORKSPACE/build/src/vs2017_15.8.4/SDK/Redist/ucrt/DLLs/x64:$WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/bin/amd64:$WORKSPACE/build/src/mingw64/bin:$PATH"
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -14,14 +14,9 @@ Linux)
|
|||
MINGW*)
|
||||
WORKSPACE=$PWD
|
||||
UPLOAD_DIR=$WORKSPACE/public/build
|
||||
WIN_WORKSPACE="$(pwd -W)"
|
||||
COMPRESS_EXT=bz2
|
||||
|
||||
export INCLUDE="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/include;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/ucrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/shared;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/um;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/Include/10.0.17134.0/winrt;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/include"
|
||||
|
||||
export LIB="$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/VC/atlmfc/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/um/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/SDK/lib/10.0.17134.0/ucrt/x64;$WIN_WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/lib/amd64"
|
||||
|
||||
PATH="$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx64/x64:$WORKSPACE/build/src/vs2017_15.8.4/VC/bin/Hostx86/x86:$WORKSPACE/build/src/vs2017_15.8.4/SDK/bin/10.0.17134.0/x64:$WORKSPACE/build/src/vs2017_15.8.4/redist/x64/Microsoft.VC141.CRT:$WORKSPACE/build/src/vs2017_15.8.4/SDK/Redist/ucrt/DLLs/x64:$WORKSPACE/build/src/vs2017_15.8.4/DIA SDK/bin/amd64:$WORKSPACE/build/src/mingw64/bin:$PATH"
|
||||
. $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
VSDIR=vs2017_15.8.4
|
||||
VSPATH="${GECKO_PATH}/${VSDIR}"
|
||||
UNIX_VSPATH="$(cd ${GECKO_PATH} && pwd)/${VSDIR}"
|
||||
SDK_VERSION=10.0.17134.0
|
||||
|
||||
export INCLUDE="${VSPATH}/VC/include;${VSPATH}/VC/atlmfc/include;${VSPATH}/SDK/Include/${SDK_VERSION}/ucrt;${VSPATH}/SDK/Include/${SDK_VERSION}/shared;${VSPATH}/SDK/Include/${SDK_VERSION}/um;${VSPATH}/SDK/Include/${SDK_VERSION}/winrt;${VSPATH}/DIA SDK/include"
|
||||
export LIB="${VSPATH}/VC/lib/x64;${VSPATH}/VC/atlmfc/lib/x64;${VSPATH}/SDK/lib/${SDK_VERSION}/um/x64;${VSPATH}/SDK/lib/${SDK_VERSION}/ucrt/x64;${VSPATH}/DIA SDK/lib/amd64"
|
||||
export PATH="${UNIX_VSPATH}/VC/bin/Hostx64/x64:${UNIX_VSPATH}/VC/bin/Hostx86/x86:${UNIX_VSPATH}/SDK/bin/${SDK_VERSION}/x64:${UNIX_VSPATH}/redist/x64/Microsoft.VC141.CRT:${UNIX_VSPATH}/SDK/Redist/ucrt/DLLs/x64:${UNIX_VSPATH}/DIA SDK/bin/amd64:$PATH"
|
|
@ -14,40 +14,7 @@ cd $GECKO_PATH
|
|||
. taskcluster/scripts/misc/tooltool-download.sh
|
||||
export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin:$PWD/cmake/bin:$PWD/ninja/bin
|
||||
|
||||
# We will be sourcing mozconfig files, which end up calling mk_add_options with
|
||||
# various settings. We only need the variable settings they create along the
|
||||
# way. Define mk_add_options as empty so the variables are defined but nothing
|
||||
# else happens.
|
||||
# This is adapted from the start of js/src/devtools/automation/winbuildenv.sh
|
||||
# which does a similar thing.
|
||||
mk_add_options() {
|
||||
:
|
||||
}
|
||||
|
||||
export topsrcdir=$PWD
|
||||
. $topsrcdir/build/win64/mozconfig.vs2017
|
||||
|
||||
win_sdk_version="10.0.17134.0"
|
||||
export PATH="${VSPATH}/VC/bin/Hostx64/x64:${VSPATH}/SDK/bin/${win_sdk_version}/x64:${PATH}"
|
||||
export INCLUDE="${VSPATH}/VC/include:${VSPATH}/VC/atlmfc/include:${VSPATH}/SDK/Include/${win_sdk_version}/ucrt:${VSPATH}/SDK/Include/${win_sdk_version}/shared:${VSPATH}/SDK/Include/${win_sdk_version}/um:${VSPATH}/SDK/Include/${win_sdk_version}/winrt"
|
||||
export LIB="${VSPATH}/VC/lib/x64:${VSPATH}/VC/atlmfc/lib/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/ucrt/x64:${VSPATH}/SDK/Lib/${win_sdk_version}/um/x64"
|
||||
|
||||
# In the msys bash that we're running in, environment variables containing paths
|
||||
# will *sometimes* get converted to windows format on their own, but it doesn't
|
||||
# happen consistently. See bug 1508828 around comment 9 onwards for some details.
|
||||
# To ensure we consistently convert the INCLUDE and LIB variables that MSVC
|
||||
# needs for building stuff, we do it here explicitly.
|
||||
|
||||
convert_path_to_win() {
|
||||
echo $1 |
|
||||
sed -e 's#:#\n#g' | # split path components into separate lines
|
||||
sed -e 's#^/\(.\)/#\1:/#' | # replace first path component (if one letter) with equivalent drive letter
|
||||
sed -e 's#/#\\#g' | # convert all forward slashes to backslashes
|
||||
paste -s -d ';' # glue the lines back together
|
||||
}
|
||||
|
||||
export INCLUDE=$(convert_path_to_win "$INCLUDE")
|
||||
export LIB=$(convert_path_to_win "$LIB")
|
||||
. taskcluster/scripts/misc/vs-setup.sh
|
||||
|
||||
# Move the wrench-deps vendored crates into place
|
||||
mv ${MOZ_FETCHES_DIR}/wrench-deps/{vendor,.cargo} gfx/wr
|
||||
|
|
Загрузка…
Ссылка в новой задаче