Bug 1403058 Add the MinGW32 browser build to Taskcluster r?glandium draft
authorTom Ritter <tom@mozilla.com>
Thu, 28 Sep 2017 13:28:45 -0500
changeset 672180 4b92d1b7912f005fbe75b1d5d3b801a1b31ba28b
parent 671566 e1f660fc493bc4bf2f91b6df94bc98e8e3840c42
child 733741 819cf4841ad1f173687b8fea85cc3016db4e9007
push id82180
push userbmo:tom@mozilla.com
push dateThu, 28 Sep 2017 21:14:26 +0000
reviewersglandium
bugs1403058
milestone58.0a1
Bug 1403058 Add the MinGW32 browser build to Taskcluster r?glandium MozReview-Commit-ID: IQxaJbZcB1o
browser/config/mozconfigs/win32/mingw32
browser/config/tooltool-manifests/mingw32/releng.manifest
taskcluster/ci/build/windows.yml
taskcluster/ci/toolchain/windows.yml
taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
new file mode 100755
--- /dev/null
+++ b/browser/config/mozconfigs/win32/mingw32
@@ -0,0 +1,81 @@
+# 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
+
+# These aren't supported on mingw at this time
+# Bug 1393817
+MOZ_AUTOMATION_L10N_CHECK=0
+# This might be fixed on -central now
+MOZ_AUTOMATION_BUILD_SYMBOLS=0
+# Bug 1393803
+MOZ_AUTOMATION_INSTALLER=0
+
+# 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=i686-w64-mingw32
+ac_add_options --with-toolchain-prefix=i686-w64-mingw32-
+
+ac_add_options --enable-debug
+ac_add_options --disable-optimize
+
+# Knock this out from above
+ac_add_options --disable-js-shell
+
+# GCC compiling for Windows exposes a lot of warnings. We are tracking them in Bug 1394433
+ac_add_options --disable-warnings-as-errors
+
+# Temporary config settings until we get these working on mingw
+ac_add_options --disable-tests
+ac_add_options --disable-accessibility # https://sourceforge.net/p/mingw-w64/bugs/648/
+
+# Long story
+ac_add_options --disable-sandbox # Bug 1230910
+ac_add_options --disable-stylo # Bug 1390583
+
+# These aren't supported on mingw at this time
+ac_add_options --disable-webrtc # Bug 1393901
+ac_add_options --disable-crashreporter # Bug 1391685
+ac_add_options --disable-maintenance-service
+
+# Find our toolchain
+CC="$TOOLTOOL_DIR/gcc/bin/i686-w64-mingw32-gcc"
+CXX="$TOOLTOOL_DIR/gcc/bin/i686-w64-mingw32-g++"
+
+HOST_CC="$TOOLTOOL_DIR/gcc/bin/gcc"
+HOST_CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+
+# We want to make sure we use binutils and other binaries in the tooltool
+# package.
+mk_add_options PATH="$TOOLTOOL_DIR/gcc/bin:$TOOLTOOL_DIR/gcc/i686-w64-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/gcc/lib64:$TOOLTOOL_DIR/gcc/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"
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/browser/config/tooltool-manifests/mingw32/releng.manifest
@@ -0,0 +1,2 @@
+[
+]
\ No newline at end of file
old mode 100644
new mode 100755
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -464,8 +464,39 @@ win64-devedition-nightly/opt:
             - disable_signing.py
             - taskcluster_nightly.py
         custom-build-variant-cfg: devedition
     run-on-projects: [ 'mozilla-beta', ]
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-sccache
+
+win32-mingw32/debug:
+    description: "Win32 MinGW Debug"
+    index:
+        product: firefox
+        job-name: win32-mingw32-debug
+    treeherder:
+        platform: windows-mingw32-32/debug
+        symbol: tc(B)
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 7200
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/mingw32/releng.manifest"
+    run:
+        using: mozharness
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/releng_base_windows_32_mingw_builds.py
+        tooltool-downloads: public
+        need-xvfb: false
+    toolchains:
+        - linux64-gcc
+        - mingw32-rust
+        - linux64-upx
+        - linux64-wine
+        - linux64-sccache
+        - linux64-mingw32-gcc
+        - linux64-mingw32-nsis
+        - linux64-mingw32-fxc2
old mode 100644
new mode 100755
--- a/taskcluster/ci/toolchain/windows.yml
+++ b/taskcluster/ci/toolchain/windows.yml
@@ -137,16 +137,43 @@ win32-rust-1.19:
         arguments: [
           '--channel', '1.19.0',
           '--host', 'i686-pc-windows-msvc',
           '--target', 'i686-pc-windows-msvc',
         ]
         toolchain-alias: win32-rust
         toolchain-artifact: public/build/rustc.tar.bz2
 
+mingw32-rust-1.19:
+    description: "rust repack"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TMW(rust)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: desktop-build}
+        max-run-time: 7200
+        env:
+          UPLOAD_DIR: artifacts
+    run:
+        using: toolchain-script
+        script: repack_rust.py
+        arguments: [
+          '--channel', '1.19.0',
+          '--host', 'i686-unknown-linux-gnu',
+          '--target', 'i686-pc-windows-msvc',
+          '--target', 'i686-pc-windows-gnu',
+          '--target', 'x86_64-unknown-linux-gnu',
+          '--target', 'i686-unknown-linux-gnu',
+        ]
+        toolchain-alias: mingw32-rust
+        toolchain-artifact: public/build/rustc.tar.xz
+
 win64-sccache:
     description: "sccache toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TW64(sccache)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
old mode 100644
new mode 100755
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -116,16 +116,17 @@ JOB_NAME_WHITELIST = set([
     'win64-noopt-debug',
     'win64-opt',
     'win64-pgo',
     'win64-st-an-debug',
     'win64-st-an-opt',
     'win64-asan-debug',
     'win64-asan-opt',
     'win64-dmd-opt',
+    'win32-mingw32-debug',
 ])
 
 JOB_NAME_WHITELIST_ERROR = """\
 The gecko-v2 job name {} is not in the whitelist in gecko_v2_whitelist.py.
 If this job runs on Buildbot, please ensure that the job names match between
 Buildbot and TaskCluster, then add the job name to the whitelist.  If this is a
 new job, there is nothing to check -- just add the job to the whitelist.
 """
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
@@ -0,0 +1,91 @@
+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
+
+    # note: overridden by MOZHARNESS_ACTIONS in TaskCluster tasks
+    'default_actions': [
+        'clobber',
+        'clone-tools',
+        'checkout-sources',
+        'build',
+        'upload-files',
+        'sendchange',
+        'check-test',
+        'update',  # decided by query_is_nightly()
+    ],
+    "buildbot_json_path": "buildprops.json",
+    'exes': {
+        "buildbot": "/tools/buildbot/bin/buildbot",
+    },
+    'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
+    # decides whether we want to use moz_sign_cmd in env
+    'enable_signing': False,
+    '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',
+    'objdir': 'obj-firefox',
+    'tooltool_script': ["/builds/tooltool.py"],
+    'tooltool_bootstrap': "setup.sh",
+    'enable_count_ctors': False,
+    'enable_talos_sendchange': False,
+    'enable_unittest_sendchange': True,
+    #########################################################################
+
+
+    #########################################################################
+    ###### 32 bit specific ######
+    'base_name': 'WINNT_5.2_MINGW_%(branch)s',
+    'platform': 'win32',
+    'stage_platform': 'win32',
+    'publish_nightly_en_US_routes': False,
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'DISPLAY': ':2',
+        'HG_SHARE_BASE_DIR': '/builds/hg-shared',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/builds/worker/tooltool-cache',
+        'TOOLTOOL_HOME': '/builds',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'CCACHE_DIR': '/builds/ccache',
+        'CCACHE_COMPRESS': '1',
+        'CCACHE_UMASK': '002',
+        'LC_ALL': 'C',
+        # 32 bit specific
+        'PATH': '/tools/buildbot/bin:/usr/local/bin:/usr/lib/ccache:\
+/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/tools/git/bin:\
+/tools/python27/bin:/tools/python27-mercurial/bin:/home/cltbld/bin',
+        'LD_LIBRARY_PATH': "/tools/gcc-4.3.3/installed/lib",
+    },
+    'upload_env': {
+        # stage_server is dictated from build_pool_specifics.py
+        'UPLOAD_HOST': '%(stage_server)s',
+        'UPLOAD_USER': '%(stage_username)s',
+        'UPLOAD_SSH_KEY': '/home/mock_mozilla/.ssh/%(stage_ssh_key)s',
+        'UPLOAD_TO_TEMP': '1',
+    },
+    "check_test_env": {
+        'MINIDUMP_STACKWALK': '%(abs_tools_dir)s/breakpad/linux/minidump_stackwalk',
+        'MINIDUMP_SAVE_PATH': '%(base_work_dir)s/minidumps',
+    },
+    'src_mozconfig': 'browser/config/mozconfigs/win32/mingw32',
+    #########################################################################
+}