Bug 1619097 - Port bug 1617794: Add tier-2 64-bit Windows cross build. r=darktrojan
authorRob Lemley <rob@thunderbird.net>
Thu, 27 Feb 2020 22:32:06 -0500
changeset 37477 526492aedbb6b9ea320fdaf1d38b2e0b170117be
parent 37476 9afcfb7f0138d996b030cc87e92723f92a844de0
child 37478 fc4e611490916c260705dce78e94678e7a610662
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdarktrojan
bugs1619097, 1617794
Bug 1619097 - Port bug 1617794: Add tier-2 64-bit Windows cross build. r=darktrojan Set up a new win64 build job that cross-compiles on Linux using clang-cl and Visual Studio libraries.
mail/config/mozconfigs/win64/cross
taskcluster/ci/build/kind.yml
taskcluster/ci/build/windows-cross.yml
taskcluster/ci/docker-image/kind.yml
taskcluster/ci/toolchain/kind.yml
new file mode 100644
--- /dev/null
+++ b/mail/config/mozconfigs/win64/cross
@@ -0,0 +1,56 @@
+. "$topsrcdir/comm/build/mozconfig.comm-sccache"
+. "$topsrcdir/build/mozconfig.win-common"
+. "$topsrcdir/build/mozconfig.common"
+. "$topsrcdir/build/mozconfig.stylo"
+. "$topsrcdir/comm/mail/config/mozconfigs/common"
+. "$topsrcdir/comm/mail/config/mozconfigs/win64/common-win64"
+
+ac_add_options --enable-update-channel="${MOZ_UPDATE_CHANNEL}"
+ac_add_options --enable-profiling
+
+# Needed to enable breakpad in application.ini
+export MOZILLA_OFFICIAL=1
+
+export MOZ_TELEMETRY_REPORTING=1
+
+# Disable enforcing that add-ons are signed by the trusted root
+MOZ_REQUIRE_ADDON_SIGNING=0
+
+# Package js shell
+export MOZ_PACKAGE_JSSHELL=1
+
+. $topsrcdir/build/win64/mozconfig.vs-latest
+
+# Set up mapi includes (must be done after visual studio setup)
+export INCLUDE=$TOOLTOOL_DIR/mapiheader
+
+
+ac_add_options --with-branding=comm/mail/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
--- a/taskcluster/ci/build/kind.yml
+++ b/taskcluster/ci/build/kind.yml
@@ -1,29 +1,31 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 loader: taskgraph.loader.transform:loader
 
 kind-dependencies:
+    - fetch
     - toolchain
     - thirdparty
 
 transforms:
     - taskgraph.transforms.build:transforms
     - taskgraph.transforms.build_attrs:transforms
     - taskgraph.transforms.build_lints:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
 
 jobs-from:
     - linux.yml
     - macosx.yml
     - windows.yml
+    - windows-cross.yml
 
 job-defaults:
     when:
         files-changed:
             # Include everything in comm-central except suite/
             # https://bugzilla.mozilla.org/show_bug.cgi?id=1422060
             - comm/build
             - comm/calendar
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/build/windows-cross.yml
@@ -0,0 +1,71 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+---
+job-defaults:
+    run:
+        using: mozharness
+        use-caches: false
+        comm-checkout: true
+        config-paths:
+            - comm/mozharness
+        tooltool-downloads: internal
+
+
+win64-cross/opt:
+    description: "Win64 Opt Cross"
+    index:
+        product: thunderbird
+        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: "comm/mail/config/tooltool-manifests/win64/releng.manifest"
+    run:
+        actions: [build]
+        options: [append-env-variables-from-configs]
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/taskcluster_base_thunderbird.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/:/builds/worker/workspace/build/src/mapiheader/"
+        mozconfig-variant: cross
+    run-on-projects: ['try']
+    dependencies:
+        win64-clang-cl: toolchain-win64-clang-cl
+    fetches:
+        toolchain:
+            - linux64-binutils
+            - linux64-cbindgen
+            - linux64-clang
+            - linux64-dump-syms
+            - linux64-liblowercase
+            - linux64-nasm
+            - linux64-node
+            - linux64-rust-cross-1.41
+            - linux64-sccache
+            - linux64-wine
+        fetch:
+            - nsis-3.01-win
+            - upx-3.95-win
+        win64-clang-cl:
+            - artifact: clang.tar.bz2
+              extract: true
+              dest: clang-cl
--- a/taskcluster/ci/docker-image/kind.yml
+++ b/taskcluster/ci/docker-image/kind.yml
@@ -11,16 +11,17 @@ kind-dependencies:
 reference-jobs:
     - debian7-amd64-build
     - debian7-base
     - debian7-i386-build
     - debian7-i386-packages
     - debian7-i386-raw
     - debian7-packages
     - debian7-raw
+    - debian9-amd64-build
     - debian9-base
     - debian9-packages
     - debian9-raw
     - debian10-amd64-build
     - debian10-base
     - debian10-packages
     - debian10-raw
     - desktop1604-test
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -12,33 +12,37 @@ jobs:
     - linux64-binutils
     - linux64-cbindgen
     - linux64-cctools-port
     - linux64-clang
     - linux64-clang-7
     - linux64-clang-macosx-cross
     - linux64-clang-mingw-x64
     - linux64-clang-mingw-x86
+    - linux64-dump-syms
     - linux64-gcc
     - linux64-gcc-7
     - linux64-hfsplus
     - linux64-libdmg
+    - linux64-liblowercase
     - linux64-llvm-dsymutil
     - linux64-mar-tools
     - linux64-minidump-stackwalk
     - linux64-nasm
     - linux64-node
     - linux64-rust
     - linux64-rust-1.39
     - linux64-rust-1.41
+    - linux64-rust-cross-1.41
     - linux64-rust-macos
     - linux64-rust-macos-1.41
     - linux64-rust-size
     - linux64-sccache
     - linux64-upx
+    - linux64-wine
     - macosx64-minidump-stackwalk
     - macosx64-node
     - mingw32-rust-1.41
     - wasi-sysroot
     - win32-node
     - win32-minidump-stackwalk
     - win64-cbindgen
     - win64-clang-cl