Bug 1403058 Add the MinGW32 browser build to Taskcluster r?glandium draft
authorTom Ritter <tom@mozilla.com>
Thu, 05 Oct 2017 11:46:32 -0500
changeset 675780 14c18226b9f5a9500f0b90840a29b5065c91821a
parent 675508 53bbdaaa2b8c1819061be26101b075c081b23260
child 676028 00a90ef82ce63e2fd3c2bc116750cd99e14b20d4
push id83241
push userbmo:tom@mozilla.com
push dateThu, 05 Oct 2017 21:42:10 +0000
reviewersglandium
bugs1403058
milestone58.0a1
Bug 1403058 Add the MinGW32 browser build to Taskcluster r?glandium MozReview-Commit-ID: EGWX1EfqBNJ
browser/config/mozconfigs/win32/mingw32
taskcluster/ci/build/windows.yml
taskcluster/ci/toolchain/windows.yml
taskcluster/scripts/misc/build-gcc-mingw32.sh
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
old mode 100644
new mode 100755
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -514,8 +514,36 @@ 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
+    run:
+        using: mozharness
+        script: mozharness/scripts/fx_desktop_build.py
+        config:
+            - builds/releng_base_windows_32_mingw_builds.py
+        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,42 @@ 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-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
--- a/taskcluster/scripts/misc/build-gcc-mingw32.sh
+++ b/taskcluster/scripts/misc/build-gcc-mingw32.sh
@@ -8,40 +8,40 @@ HOME_DIR=$WORKSPACE/build
 UPLOAD_DIR=$HOME/artifacts
 
 # Do not define root_dir so we build everything to a tmpdir
 #root_dir=$HOME_DIR
 data_dir=$HOME_DIR/src/build/unix/build-gcc
 
 . $data_dir/build-gcc.sh
 
-gcc_version=5.4.0
-gcc_ext=bz2
+gcc_version=6.4.0
+gcc_ext=xz
 binutils_version=2.27
 binutils_ext=bz2
 binutils_configure_flags="--target=i686-w64-mingw32"
-mingw_version=da41a54ba54c6e37322f111a5b76099b9cd39051
+mingw_version=cf626ef8965e062e29d4665590aa2920dcd54e75
 
 # GPG keys used to sign GCC (collected from 5.1.0, 5.4.0, 6.4.0)
 $GPG --import $data_dir/33C235A34C46AA3FFB293709A328C3A2C3C45C06.key
 $GPG --import $data_dir/7F74F97C103468EE5D750B583AB00996FC26A641.key
 # GPG key used to sign binutils
 $GPG --import $data_dir/EAF1C276A747E9ED86210CBAC3126D3B4AE55E93.key
 # GPG key used to sign GMP
 $GPG --import $data_dir/343C2FF0FBEE5EC2EDBEF399F3599FF828C67298.key
 # GPG key used to sign MPFR
 $GPG --import $data_dir/07F3DBBECC1A39605078094D980C197698C3739D.key
 # GPG key used to sign MPC
 $GPG --import $data_dir/AD17A21EF8AED8F1CC02DBD9F7D5C9BF765C61E3.key
 
 cat > $root_dir/checksums <<EOF
 369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88  binutils-2.27.tar.bz2
-608df76dec2d34de6558249d8af4cbee21eceddbcb580d666f7a5a583ca3303a  gcc-5.4.0.tar.bz2
+850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4  gcc-6.4.0.tar.xz
 752079520b4690531171d0f4532e40f08600215feefede70b24fabdc6f1ab160  gmp-5.1.3.tar.bz2
-7e3c02ff52f8540f6a85534f54158968417fd676001651c8289c705bd0228f36  isl-0.14.tar.bz2
+8ceebbf4d9a81afa2b4449113cee4b7cb14a687d7a549a963deb5e2a41458b6b  isl-0.15.tar.bz2
 ae79f8d41d8a86456b68607e9ca398d00f8b7342d1d83bcf4428178ac45380c7  mpc-0.8.2.tar.gz
 ca498c1c7a74dd37a576f353312d1e68d490978de4395fa28f1cbd46a364e658  mpfr-3.1.5.tar.bz2
 EOF
 
 prepare
 build_binutils
 build_gcc_and_mingw
 
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -122,16 +122,17 @@ JOB_NAME_WHITELIST = set([
     'win64-opt',
     'win64-pgo',
     'win64-rusttests-opt',
     '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 100755
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_base_windows_32_mingw_builds.py
@@ -0,0 +1,82 @@
+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',
+        'check-test',
+        'update',  # decided by query_is_nightly()
+    ],
+    "buildbot_json_path": "buildprops.json",
+    '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,
+    #########################################################################
+
+
+    #########################################################################
+    ###### 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',
+        'LC_ALL': 'C',
+        # 32 bit specific
+        'PATH': '/tools/buildbot/bin:/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',
+    #########################################################################
+}