diff --git a/browser/config/mozconfigs/win64/cross b/browser/config/mozconfigs/win64/cross new file mode 100644 index 000000000000..0bd2a2110070 --- /dev/null +++ b/browser/config/mozconfigs/win64/cross @@ -0,0 +1,37 @@ +APIKEYDIR=/builds + +. "$topsrcdir/build/mozconfig.win-common" +. "$topsrcdir/browser/config/mozconfigs/win64/common-win64" +. "$topsrcdir/browser/config/mozconfigs/win64/common-opt" + +ac_add_options --with-branding=browser/branding/nightly + +# Configure expects executables for check_prog, so set the relevant files +# as executable on the first evaluation of the mozconfig where they exist. +if [ -d "${VSPATH}" -a ! -x "${VSPATH}/VC/bin/Hostx64/x64/cl.exe" ]; then + find "${VSPATH}" -type f -name \*.exe -exec chmod +x {} \; +fi +export MAKENSISU="${MOZ_FETCHES_DIR}/nsis-3.01/makensis.exe" +if [ -d "${MAKENSISU%/*}" -a ! -x "${MAKENSISU}" ]; then + chmod +x "${MAKENSISU}" +fi +export MAKECAB="${TOOLTOOL_DIR}/makecab.exe" +if [ -f "${MAKECAB}" ]; then + chmod +x "${MAKECAB}" +fi +export UPX="${MOZ_FETCHES_DIR}/upx-3.95-win64/upx.exe" +if [ -f "${UPX}" ]; then + chmod +x "${UPX}" +fi +CLANG_CL_EXE_DIR="${MOZ_FETCHES_DIR}/clang-cl/clang/bin" +if [ -d "${CLANG_CL_EXE_DIR}" ]; then + chmod +x "${CLANG_CL_EXE_DIR}/clang-cl.exe" +fi +export WINE=${MOZ_FETCHES_DIR}/wine/bin/wine64 +export RC=rc.exe +export MIDL=midl.exe +mk_add_options "export PATH=${TOOLTOOL_DIR}/vs2017_15.8.4/VC/bin/Hostx64/x64:${MOZ_FETCHES_DIR}/nsis-3.01:${CLANG_CL_EXE_DIR}:${PATH}" + +unset VC_PATH + +. "$topsrcdir/build/mozconfig.common.override" diff --git a/build/mozconfig.clang-cl b/build/mozconfig.clang-cl index cfc7a2a8fc0c..cb32289abefb 100644 --- a/build/mozconfig.clang-cl +++ b/build/mozconfig.clang-cl @@ -13,7 +13,14 @@ export CXX=clang-cl export ENABLE_CLANG_PLUGIN=1 if [ -n "$UPLOAD_PATH" ]; then - DIAGNOSTICS_DIR="$(cmd.exe //e:on //c if not exist ${UPLOAD_PATH} mkdir ${UPLOAD_PATH} && cd ${UPLOAD_PATH} && pwd)" + case "$(uname -s)" in + MINGW*) + DIAGNOSTICS_DIR="$(cmd.exe //e:on //c if not exist ${UPLOAD_PATH} mkdir ${UPLOAD_PATH} && cd ${UPLOAD_PATH} && pwd)" + ;; + *) + DIAGNOSTICS_DIR="${UPLOAD_PATH}" + ;; + esac export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${DIAGNOSTICS_DIR}" export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${DIAGNOSTICS_DIR}" fi diff --git a/build/mozconfig.win-common b/build/mozconfig.win-common index 6bf3254a10cf..8fcec491fbe1 100644 --- a/build/mozconfig.win-common +++ b/build/mozconfig.win-common @@ -4,7 +4,7 @@ TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir} export MAKECAB=$TOOLTOOL_DIR/makecab.exe -export DUMP_SYMS="${MOZ_FETCHES_DIR}/dump_syms/dump_syms.exe" +export DUMP_SYMS="${MOZ_FETCHES_DIR}/dump_syms/dump_syms" if [ -z "$USE_ARTIFACT" ]; then if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" ]; then diff --git a/build/win64/mozconfig.vs2017 b/build/win64/mozconfig.vs2017 index 17938efdc58d..d19cb5a40ba0 100644 --- a/build/win64/mozconfig.vs2017 +++ b/build/win64/mozconfig.vs2017 @@ -4,7 +4,7 @@ if [ -z "${VSPATH}" ]; then fi if [ -d "${VSPATH}" ]; then - VSWINPATH="$(cd ${VSPATH} && pwd -W)" + VSWINPATH="$(cd ${VSPATH} && (pwd -W 2>/dev/null || pwd))" export WINDOWSSDKDIR="${VSWINPATH}/SDK" export WIN32_REDIST_DIR=${VSPATH}/VC/redist/x64/Microsoft.VC141.CRT diff --git a/taskcluster/ci/build/windows.yml b/taskcluster/ci/build/windows.yml index fd5400753db3..a8d83864f4a5 100755 --- a/taskcluster/ci/build/windows.yml +++ b/taskcluster/ci/build/windows.yml @@ -275,6 +275,64 @@ win64-plain/opt: - win64-node - win64-cbindgen +win64-cross/opt: + description: "Win64 Opt Cross" + index: + product: firefox + job-name: win64-cross-opt + treeherder: + platform: windows2012-64/opt + symbol: Bx + tier: 2 + worker-type: b-linux + worker: + docker-image: {in-tree: debian9-amd64-build} + max-run-time: 7200 + env: + PERFHERDER_EXTRA_OPTIONS: cross + TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest" + run: + actions: [get-secrets, build] + options: [append-env-variables-from-configs] + script: mozharness/scripts/fx_desktop_build.py + secrets: true + config: + - builds/releng_base_firefox.py + builds/releng_base_linux_64_builds.py + extra-config: + disable_package_metrics: true + mozconfig_platform: win64 + mozconfig_variant: cross + env: + # Setting LD_PRELOAD at the worker level would set it during + # fetch-content, which can fail randomly when a tar/unzip subprocess + # of fetch-content starts while the library is being extracted by + # another. + LD_PRELOAD: "/builds/worker/fetches/liblowercase/liblowercase.so" + LOWERCASE_DIRS: "/builds/worker/workspace/build/src/vs2017_15.8.4/" + mozconfig-variant: cross + run-on-projects: ['try'] + dependencies: + win64-clang-cl: toolchain-win64-clang-cl + fetches: + toolchain: + - linux64-binutils + - linux64-clang + - linux64-rust-cross-1.41 + - linux64-nasm + - linux64-node + - linux64-cbindgen + - linux64-dump-syms + - linux64-wine + - linux64-liblowercase + fetch: + - nsis-3.01-win + - upx-3.95-win + win64-clang-cl: + - artifact: clang.tar.bz2 + extract: true + dest: clang-cl + win32-shippable/opt: description: "Win32 Opt Shippable" use-pgo: true