Bug 1465800 Create an x64 MinGW-Clang Browser Build job r?froydnj draft
authorTom Ritter <tom@mozilla.com>
Tue, 14 Aug 2018 16:15:56 -0500
changeset 829700 55c6badeeff2bc9a1442eefcd0d5fba7591874c8
parent 829049 0fc57261a269af5b3f787a48395c83ab558c3035
push id118791
push userbmo:tom@mozilla.com
push dateThu, 16 Aug 2018 15:46:35 +0000
reviewersfroydnj
bugs1465800
milestone63.0a1
Bug 1465800 Create an x64 MinGW-Clang Browser Build job r?froydnj MozReview-Commit-ID: 7TSCY52wTpR
browser/config/mozconfigs/win64/mingwclang
browser/config/mozconfigs/win64/mingwclang-debug
taskcluster/ci/build/windows.yml
taskcluster/ci/config.yml
testing/mozharness/configs/builds/releng_base_windows_64_mingw_builds.py
testing/mozharness/configs/builds/releng_sub_windows_configs/64_mingwclang.py
testing/mozharness/configs/builds/releng_sub_windows_configs/64_mingwclang_debug.py
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/win64/mingwclang
@@ -0,0 +1,76 @@
+# Sets:
+#    MOZ_AUTOMATION flags
+#    SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE - shouldn't be used?
+#    TOOLTOOL_DIR
+#    MAKECAB - shouldn't be used?
+. "$topsrcdir/build/mozconfig.win-common"
+
+# MinGW does not have (or need) makecab
+unset MAKECAB
+
+# Sets:
+#  build/mozconfig.common
+#    AUTOCLOBBER=1
+#    --enable-crashreporter
+#    --enable-release
+#    LLVM_CONFIG
+#    MOZ_ADDON_SIGNING
+#    MOZ_REQUIRE_SIGNING
+#    --enable-js-shell
+#  build/mozconfig.automation
+#    MOZ_AUTOMATION_ flags
+#  build/mozconfig.rust
+#    TOOLTOOL_DIR
+#    RUSTC
+#    CARGO
+. "$topsrcdir/browser/config/mozconfigs/common"
+
+# MinGW Stuff
+ac_add_options --target=x86_64-w64-mingw32
+ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
+
+ac_add_options --disable-warnings-as-errors
+
+# Temporary config settings until we get these working on mingw
+ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/
+
+BINDGEN_CFLAGS="-I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include/c++/v1 -I$TOOLTOOL_DIR/clang/lib/clang/7.0.0/include -I$TOOLTOOL_DIR/clang/x86_64-w64-mingw32/include"
+
+# For now, we'll disable the sandbox, until we get get Bug 1461421 figured out
+ac_add_options --disable-sandbox
+
+# These aren't supported on mingw at this time
+ac_add_options --disable-webrtc # Bug 1393901
+ac_add_options --disable-maintenance-service
+
+# Find our toolchain
+HOST_CC="$TOOLTOOL_DIR/clang/bin/clang"
+HOST_CXX="$TOOLTOOL_DIR/clang/bin/clang++"
+CC="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang"
+CXX="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang++"
+CPP="$TOOLTOOL_DIR/clang/bin/x86_64-w64-mingw32-clang -E"
+AR=llvm-ar
+RANLIB=llvm-ranlib
+
+# Since we use windres from binutils without the rest of tools (like cpp), we need to
+# explicitly specify clang as a preprocessor.
+WINDRES="x86_64-w64-mingw32-windres --preprocessor=\"$CPP -xc\" -DRC_INVOKED"
+
+# Bug 1471698 - Work around binutils corrupting mingw clang binaries.
+LDFLAGS="-Wl,-S"
+STRIP=/bin/true
+OBJCOPY=/bin/true
+
+# We want to make sure we use binutils and other binaries in the tooltool
+# package.
+mk_add_options "export PATH=$TOOLTOOL_DIR/clang/bin:$TOOLTOOL_DIR/mingw32/bin:$TOOLTOOL_DIR/wine/bin:$TOOLTOOL_DIR/upx/bin:$TOOLTOOL_DIR/fxc2/bin:$PATH"
+
+LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/mingw32/lib64:$TOOLTOOL_DIR/clang/lib
+mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
+
+# Do not include the visual studio related mozconfigs of course
+
+ac_add_options --with-branding=browser/branding/nightly
+
+. "$topsrcdir/build/mozconfig.common.override"
+. "$topsrcdir/build/mozconfig.cache"
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/win64/mingwclang-debug
@@ -0,0 +1,6 @@
+MOZ_AUTOMATION_L10N_CHECK=0
+
+. "$topsrcdir/browser/config/mozconfigs/win64/mingwclang"
+
+ac_add_options --enable-debug
+ac_add_options --disable-optimize
\ No newline at end of file
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -1037,8 +1037,77 @@ win32-mingw32/debug:
         - linux64-upx
         - linux64-wine
         - linux64-cbindgen
         - linux64-sccache
         - linux64-mingw32-gcc
         - linux64-mingw32-nsis
         - linux64-mingw32-fxc2
         - linux64-node
+
+win64-mingwclang/opt:
+    description: "Win64 MinGW-Clang Opt"
+    index:
+        product: firefox
+        job-name: win64-mingwclang-opt
+    treeherder:
+        platform: windows-mingw32/all
+        symbol: WMC64(Bo)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: mingw32-build}
+        max-run-time: 7200
+        env:
+            PERFHERDER_EXTRA_OPTIONS: "opt 64 clang"
+    run:
+        using: mozharness
+        actions: [build]
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/releng_base_firefox.py
+            - builds/releng_base_windows_64_mingw_builds.py
+            - builds/releng_sub_windows_configs/64_mingwclang.py
+        need-xvfb: false
+    toolchains:
+        - mingw32-rust
+        - linux64-upx
+        - linux64-wine
+        - linux64-sccache
+        - linux64-node
+        - linux64-clang-7-mingw
+        - linux64-mingw32-nsis
+        - linux64-mingw32-fxc2
+
+win64-mingwclang/debug:
+    description: "Win64 MinGW-Clang Debug"
+    index:
+        product: firefox
+        job-name: win64-mingwclang-debug
+    treeherder:
+        platform: windows-mingw32/all
+        symbol: WMC64(Bd)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: mingw32-build}
+        max-run-time: 72000
+        env:
+            PERFHERDER_EXTRA_OPTIONS: "debug 64 clang"
+    run:
+        using: mozharness
+        actions: [build]
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/releng_base_firefox.py
+            - builds/releng_base_windows_64_mingw_builds.py
+            - builds/releng_sub_windows_configs/64_mingwclang.py
+            - builds/releng_sub_windows_configs/64_mingwclang_debug.py
+        need-xvfb: false
+    toolchains:
+        - mingw32-rust
+        - linux64-upx
+        - linux64-wine
+        - linux64-sccache
+        - linux64-node
+        - linux64-clang-7-mingw
+        - linux64-mingw32-nsis
+        - linux64-mingw32-fxc2
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -57,16 +57,17 @@ treeherder:
         'I': 'Docker Image Builds'
         'TL': 'Toolchain builds for Linux 64-bits'
         'TM': 'Toolchain builds for OSX'
         'TMW': 'Toolchain builds for Windows MinGW'
         'TW32': 'Toolchain builds for Windows 32-bits'
         'TW64': 'Toolchain builds for Windows 64-bits'
         'WM32': 'MinGW builds for Windows 32-bits'
         'WM64': 'MinGW builds for Windows 64-bits'
+        'WMC64': 'MinGW-Clang builds for Windows 64-bits'
         'Searchfox': 'Searchfox builds'
         'SM': 'Spidermonkey builds'
         'pub': 'APK publishing'
         'p': 'Partial generation'
         'ps': 'Partials signing'
         'Rel': 'Release promotion'
         'Snap': 'Snap image generation'
         'langpack': 'Langpack sigatures and uploads'
new file mode 100755
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_base_windows_64_mingw_builds.py
@@ -0,0 +1,56 @@
+import os
+
+config = {
+    #########################################################################
+    ######## LINUX GENERIC CONFIG KEYS/VAlUES
+    # if you are updating this with custom 32 bit keys/values please add them
+    # below under the '32 bit specific' code block otherwise, update in this
+    # code block and also make sure this is synced with
+    # releng_base_linux_64_builds.py
+
+    'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
+    # decides whether we want to use moz_sign_cmd in env
+    'secret_files': [
+        {'filename': '/builds/gapi.data',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/gapi.data',
+         'min_scm_level': 1},
+        {'filename': '/builds/mozilla-desktop-geoloc-api.key',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/mozilla-desktop-geoloc-api.key',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+        {'filename': '/builds/adjust-sdk.token',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk.token',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+        {'filename': '/builds/adjust-sdk-beta.token',
+         'secret_name': 'project/releng/gecko/build/level-%(scm-level)s/adjust-sdk-beta.token',
+         'min_scm_level': 2, 'default': 'try-build-has-no-secrets'},
+    ],
+    'vcs_share_base': '/builds/hg-shared',
+    #########################################################################
+
+
+    #########################################################################
+    ###### 64 bit specific ######
+    'base_name': 'WINNT_5.2_MINGW_%(branch)s',
+    'platform': 'win64-mingw32',
+    'stage_platform': 'win64-mingw32',
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'DISPLAY': ':2',
+        'HG_SHARE_BASE_DIR': '/builds/hg-shared',
+        'MOZ_OBJDIR': '%(abs_obj_dir)s',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/builds/worker/tooltool-cache',
+        'TOOLTOOL_HOME': '/builds',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'LC_ALL': 'C',
+        # 32 bit specific
+        'PATH': '/usr/local/bin:/bin:/usr/bin',
+    },
+    "check_test_env": {
+        'MINIDUMP_STACKWALK': '%(abs_tools_dir)s/breakpad/linux/minidump_stackwalk',
+        'MINIDUMP_SAVE_PATH': '%(base_work_dir)s/minidumps',
+    },
+    'mozconfig_platform': 'win64',
+    'mozconfig_variant': 'mingw32',
+    #########################################################################
+}
new file mode 100755
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_windows_configs/64_mingwclang.py
@@ -0,0 +1,7 @@
+config = {
+    'base_name': 'WINNT_5.2_MINGWCLANG_%(branch)s',
+    'platform': 'win64-mingwclang',
+    'stage_platform': 'win64-mingwclang',
+    'mozconfig_platform': 'win64',
+    'mozconfig_variant': 'mingwclang',
+}
new file mode 100755
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_windows_configs/64_mingwclang_debug.py
@@ -0,0 +1,3 @@
+config = {
+    'mozconfig_variant': 'mingwclang-debug',
+}