Bug 1511224 - Add win64-nasm toolchain. r=ted,jya,glandium
☠☠ backed out by 179d3ee81e2d ☠ ☠
authorThomas Daede <tdaede@mozilla.com>
Thu, 14 Feb 2019 17:11:57 +0000
changeset 459166 fe264afc03aa19732b13e1bf06fe05816cefed76
parent 459165 16ad89a4e4250059c7082f05487b60ccb0c53469
child 459167 ff5227d3d1fd4f517bb5ceb696fcf8790c28fdaa
push id35556
push userdvarga@mozilla.com
push dateFri, 15 Feb 2019 01:38:24 +0000
treeherdermozilla-central@b29c87add05f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted, jya, glandium
bugs1511224
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1511224 - Add win64-nasm toolchain. r=ted,jya,glandium Differential Revision: https://phabricator.services.mozilla.com/D13875
build/mozconfig.common
build/mozconfig.nasm
media/ffvpx/config_win64.asm
taskcluster/ci/build/windows.yml
taskcluster/ci/fetch/toolchains.yml
taskcluster/ci/toolchain/clang.yml
taskcluster/ci/toolchain/kind.yml
taskcluster/ci/toolchain/nasm.yml
taskcluster/scripts/misc/build-nasm.sh
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -14,12 +14,13 @@ mk_add_options AUTOCLOBBER=1
 
 ac_add_options --enable-crashreporter
 
 # Disable enforcing that add-ons are signed by the trusted root
 MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
 
 ac_add_options --enable-js-shell
 
+. "$topsrcdir/build/mozconfig.nasm"
 . "$topsrcdir/build/mozconfig.node"
 . "$topsrcdir/build/mozconfig.automation"
 . "$topsrcdir/build/mozconfig.rust"
 . "$topsrcdir/build/mozconfig.cache"
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.nasm
@@ -0,0 +1,11 @@
+# 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/.
+
+case "$(uname -s)" in
+MINGW*)
+    export NASM=$topsrcdir/nasm/nasm.exe
+    ;;
+*)
+    ;;
+esac
--- a/media/ffvpx/config_win64.asm
+++ b/media/ffvpx/config_win64.asm
@@ -49,17 +49,17 @@
 %define HAVE_MMXEXT 1
 %define HAVE_SSE 1
 %define HAVE_SSE2 1
 %define HAVE_SSE3 1
 %define HAVE_SSE4 1
 %define HAVE_SSE42 1
 %define HAVE_SSSE3 1
 %define HAVE_XOP 1
-%define HAVE_CPUNOP 1
+%define HAVE_CPUNOP 0
 %define HAVE_I686 1
 %define HAVE_MIPSFPU 0
 %define HAVE_MIPS32R2 0
 %define HAVE_MIPS32R5 0
 %define HAVE_MIPS64R2 0
 %define HAVE_MIPS32R6 0
 %define HAVE_MIPS64R6 0
 %define HAVE_MIPSDSP 0
--- a/taskcluster/ci/build/windows.yml
+++ b/taskcluster/ci/build/windows.yml
@@ -29,16 +29,17 @@ win32/debug:
             - builds/taskcluster_sub_win32/debug.py
         mozconfig-variant: debug
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32/opt:
     description: "Win32 Opt"
     index:
         product: firefox
         job-name: win32-opt
     attributes:
@@ -62,16 +63,17 @@ win32/opt:
         extra-config:
             stage_platform: win32
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32/pgo:
     description: "Win32 Opt PGO"
     index:
         product: firefox
         job-name: win32-pgo
     attributes:
@@ -95,16 +97,17 @@ win32/pgo:
         extra-config:
             stage_platform: win32
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64/debug:
     description: "Win64 Debug"
     index:
         product: firefox
         job-name: win64-debug
     attributes:
@@ -128,16 +131,17 @@ win64/debug:
             - builds/taskcluster_sub_win64/debug.py
         mozconfig-variant: debug
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-fuzzing/debug:
     description: "Win64 Fuzzing Debug"
     index:
         product: firefox
         job-name: win64-fuzzing-debug
     attributes:
@@ -163,16 +167,17 @@ win64-fuzzing/debug:
         mozconfig-variant: debug-fuzzing
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-plain/debug:
     description: "Win64 Debug Plain"
     index:
         product: firefox
         job-name: win64-plain-debug
     treeherder:
@@ -196,16 +201,17 @@ win64-plain/debug:
             disable_package_metrics: true
             stage_platform: win64
         mozconfig-variant: plain-debug
     run-on-projects: [trunk]
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-node
+        - win64-nasm
         - win64-cbindgen
 
 win64/opt:
     description: "Win64 Opt"
     index:
         product: firefox
         job-name: win64-opt
     attributes:
@@ -229,16 +235,17 @@ win64/opt:
         extra-config:
             stage_platform: win64
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-plain/opt:
     description: "Win64 Opt Plain"
     index:
         product: firefox
         job-name: win64-plain-opt
     treeherder:
@@ -262,16 +269,17 @@ win64-plain/opt:
         extra-config:
             disable_package_metrics: true
             stage_platform: win64
         mozconfig-variant: plain-opt
     run-on-projects: [trunk]
     toolchains:
         - win64-clang-cl
         - win64-rust
+        - win64-nasm
         - win64-node
         - win64-cbindgen
 
 win32-nightly/opt:
     description: "Win32 Nightly"
     index:
         product: firefox
         job-name: win32-opt
@@ -309,16 +317,17 @@ win32-nightly/opt:
         extra-config:
             stage_platform: win32
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-nightly/opt:
     description: "Win64 Nightly"
     index:
         product: firefox
         job-name: win64-opt
         type: nightly
@@ -348,16 +357,17 @@ win64-nightly/opt:
         extra-config:
             stage_platform: win64
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64/pgo:
     description: "Win64 Opt PGO"
     index:
         product: firefox
         job-name: win64-pgo
     attributes:
@@ -381,16 +391,17 @@ win64/pgo:
         extra-config:
             stage_platform: win64
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-add-on-devel/opt:
     description: "Windows32 add-on-devel"
     index:
         product: firefox
         job-name: win32-add-on-devel
     treeherder:
@@ -414,16 +425,17 @@ win32-add-on-devel/opt:
         mozconfig-variant: add-on-devel
     run-on-projects: ['mozilla-beta', 'mozilla-release', 'mozilla-esr45']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-add-on-devel/opt:
     description: "Windows64 add-on-devel"
     index:
         product: firefox
         job-name: win64-add-on-devel
     treeherder:
@@ -447,16 +459,17 @@ win64-add-on-devel/opt:
         mozconfig-variant: add-on-devel
     run-on-projects: ['mozilla-beta', 'mozilla-release', 'mozilla-esr45']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-noopt/debug:
     description: "Win64 No-optimize Debug"
     index:
         product: firefox
         job-name: win64-noopt-debug
     treeherder:
@@ -479,16 +492,17 @@ win64-noopt/debug:
         mozconfig-variant: noopt-debug
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-noopt/debug:
     description: "Win32 No-optimize Debug"
     index:
         product: firefox
         job-name: win32-noopt-debug
     treeherder:
@@ -511,16 +525,17 @@ win32-noopt/debug:
         mozconfig-variant: noopt-debug
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-rusttests/opt:
     description: "Win32 Rust Tests Opt"
     index:
         product: firefox
         job-name: win32-rusttests-opt
     treeherder:
@@ -548,16 +563,17 @@ win32-rusttests/opt:
             disable_package_metrics: true
         mozconfig-variant: rusttests
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-rusttests/debug:
     description: "Win32 Rust Tests Debug"
     index:
         product: firefox
         job-name: win32-rusttests-debug
     treeherder:
@@ -585,16 +601,17 @@ win32-rusttests/debug:
             disable_package_metrics: true
         mozconfig-variant: rusttests-debug
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-rusttests/opt:
     description: "Win64 Rust Tests Opt"
     index:
         product: firefox
         job-name: win64-rusttests-opt
     treeherder:
@@ -617,16 +634,17 @@ win64-rusttests/opt:
             - builds/taskcluster_sub_win64/rusttests_opt.py
         mozconfig-variant: rusttests
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-rusttests/debug:
     description: "Win64 Rust Tests Debug"
     index:
         product: firefox
         job-name: win64-rusttests-debug
     treeherder:
@@ -649,16 +667,17 @@ win64-rusttests/debug:
             - builds/taskcluster_sub_win64/rusttests_opt.py
         mozconfig-variant: rusttests-debug
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-ccov/debug:
     description: "Win64 Debug Code Coverage"
     index:
         product: firefox
         job-name: win64-ccov-debug
     treeherder:
@@ -685,16 +704,17 @@ win64-ccov/debug:
         mozconfig-variant: code-coverage
     run-on-projects: ['mozilla-central', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust-nightly
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
     fetches:
         toolchain:
             - win64-grcov
 
 win64-asan/debug:
     description: "Win64 Debug ASAN"
     index:
@@ -721,16 +741,17 @@ win64-asan/debug:
         mozconfig-variant: debug-asan
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-asan/opt:
     description: "Win64 Opt ASAN"
     index:
         product: firefox
         job-name: win64-asan-opt
     treeherder:
@@ -755,16 +776,17 @@ win64-asan/opt:
         mozconfig-variant: nightly-asan
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-asan-reporter-nightly/opt:
     description: "Win64 Opt ASAN Reporter Nightly"
     attributes:
         nightly: true
     shipping-product:
         by-release-type:
@@ -797,16 +819,17 @@ win64-asan-reporter-nightly/opt:
         mozconfig-variant: nightly-asan-reporter
     run-on-projects: ['mozilla-central']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-asan-fuzzing/opt:
     description: "Win64 Fuzzing Opt ASAN"
     index:
         product: firefox
         job-name: win64-fuzzing-asan-opt
     treeherder:
@@ -830,16 +853,17 @@ win64-asan-fuzzing/opt:
         mozconfig-variant: nightly-fuzzing-asan
     run-on-projects: ['trunk', 'try']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-devedition-nightly/opt:
     description: "Win32 Dev Edition Nightly"
     index:
         product: devedition
         job-name: win32-opt
         type: nightly
@@ -877,16 +901,17 @@ win32-devedition-nightly/opt:
         mozconfig-variant: devedition
     run-on-projects: ['mozilla-beta']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-devedition-nightly/opt:
     description: "Win64 Dev Edition Nightly"
     index:
         product: devedition
         job-name: win64-opt
         type: nightly
@@ -917,16 +942,17 @@ win64-devedition-nightly/opt:
         mozconfig-variant: devedition
     run-on-projects: ['mozilla-beta']
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-rust-size
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-msvc/debug:
     description: "Win32 MSVC Debug"
     index:
         product: firefox
         job-name: win32-msvc-debug
     treeherder:
@@ -948,16 +974,17 @@ win32-msvc/debug:
             - builds/taskcluster_base_win32.py
             - builds/taskcluster_sub_win32/debug.py
         mozconfig-variant: debug-msvc
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-msvc/opt:
     description: "Win32 MSVC Opt"
     index:
         product: firefox
         job-name: win32-msvc-opt
     treeherder:
@@ -980,16 +1007,17 @@ win32-msvc/opt:
         extra-config:
             stage_platform: win32
         mozconfig-variant: opt-msvc
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-msvc/debug:
     description: "Win64 MSVC Debug"
     index:
         product: firefox
         job-name: win64-msvc-debug
     treeherder:
@@ -1011,16 +1039,17 @@ win64-msvc/debug:
             - builds/taskcluster_base_win64.py
             - builds/taskcluster_sub_win64/debug.py
         mozconfig-variant: debug-msvc
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-msvc/opt:
     description: "Win64 MSVC Opt"
     index:
         product: firefox
         job-name: win64-msvc-opt
     treeherder:
@@ -1043,16 +1072,17 @@ win64-msvc/opt:
         extra-config:
             stage_platform: win64
         mozconfig-variant: opt-msvc
     toolchains:
         - win64-clang-cl
         - win64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-aarch64/debug:
     description: "AArch64 Win64 Debug"
     index:
         product: firefox
         job-name: win64-aarch64-debug
     attributes:
@@ -1078,16 +1108,17 @@ win64-aarch64/debug:
         extra-config:
             mozconfig_platform: win64-aarch64
         mozconfig-variant: debug
     toolchains:
         - win64-clang-cl
         - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-aarch64/opt:
     description: "AArch64 Win64 Opt"
     index:
         product: firefox
         job-name: win64-aarch64-opt
     attributes:
@@ -1113,16 +1144,17 @@ win64-aarch64/opt:
         extra-config:
             stage_platform: win64-aarch64
             mozconfig_platform: win64-aarch64
     toolchains:
         - win64-clang-cl
         - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win64-aarch64-nightly/opt:
     description: "AArch64 Win64 Nightly"
     index:
         product: firefox
         job-name: win64-aarch64-opt
         type: nightly
@@ -1152,16 +1184,17 @@ win64-aarch64-nightly/opt:
         extra-config:
             stage_platform: win64-aarch64
             mozconfig_platform: win64-aarch64
     toolchains:
         - win64-clang-cl
         - win64-aarch64-rust
         - win64-cbindgen
         - win64-sccache
+        - win64-nasm
         - win64-node
 
 win32-mingwclang/opt:
     description: "Win32 MinGW-Clang Opt"
     index:
         product: firefox
         job-name: win32-mingwclang-opt
     treeherder:
--- a/taskcluster/ci/fetch/toolchains.yml
+++ b/taskcluster/ci/fetch/toolchains.yml
@@ -168,16 +168,24 @@ mpfr-3.1.5:
     type: static-url
     url: http://www.mpfr.org/mpfr-3.1.5/mpfr-3.1.5.tar.bz2
     sha256: ca498c1c7a74dd37a576f353312d1e68d490978de4395fa28f1cbd46a364e658
     size: 1279489
     gpg-signature:
       sig-url: "{url}.asc"
       key-path: build/unix/build-gcc/07F3DBBECC1A39605078094D980C197698C3739D.key
 
+nasm-2.14.02:
+  description: nasm 2.14.02 source code
+  fetch:
+    type: static-url
+    url: https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
+    sha256: e24ade3e928f7253aa8c14aa44726d1edf3f98643f87c9d72ec1df44b26be8f5
+    size: 827620
+
 wix-3.1.1:
   description: wix 3.1.1 binary release
   # WIX doesn't use a wrapping toplevel DIR, so we should really repackage it when
   # Bug 1479533 and related code is ready.
   fetch:
     type: static-url
     url: https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip
     sha256: 37f0a533b0978a454efb5dc3bd3598becf9660aaf4287e55bf68ca6b527d051d
--- a/taskcluster/ci/toolchain/clang.yml
+++ b/taskcluster/ci/toolchain/clang.yml
@@ -55,17 +55,17 @@ linux64-clang-trunk-mingw-x86:
         toolchain-artifact: public/build/clangmingw.tar.xz
     toolchains:
         - linux64-gcc-4.9
 
 linux64-clang-trunk-mingw-x64:
     description: "MinGW-Clang Trunk x64 toolchain build"
     treeherder:
         symbol: TMW(clang-x64)
-        tier: 2
+        tier: 1
     run:
         script: build-clang-trunk-mingw.sh
         arguments: [
             'x64'
         ]
         resources:
             - 'build/build-clang/clang-trunk-mingw.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -30,12 +30,13 @@ jobs-from:
    - clang-tidy.yml
    - clang.yml
    - gcc.yml
    - gn.yml
    - grcov.yml
    - mingw.yml
    - minidump_stackwalk.yml
    - misc.yml
+   - nasm.yml
    - node.yml
    - rust.yml
    - rust-size.yml
    - sccache.yml
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/nasm.yml
@@ -0,0 +1,18 @@
+win64-nasm:
+    description: "nasm win64 build"
+    treeherder:
+        symbol: TW64(nasm)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        docker-image: {in-tree: mingw32-build}
+        max-run-time: 1800
+    run:
+        script: build-nasm.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/nasm.tar.bz2
+    toolchains:
+        - linux64-clang-trunk-mingw-x64
+    fetches:
+        fetch:
+            - nasm-2.14.02
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-nasm.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -x -e -v
+
+case "$(uname -s)" in
+    Linux)
+        WORKSPACE=$HOME/workspace
+        UPLOAD_DIR=$HOME/artifacts
+        COMPRESS_EXT=bz2
+        ;;
+esac
+
+cd $WORKSPACE/build/src
+
+. taskcluster/scripts/misc/tooltool-download.sh
+export PATH="$WORKSPACE/build/src/clang/bin:$PATH"
+
+cd $WORKSPACE/build/nasm-2.14.02
+./configure CC=x86_64-w64-mingw32-clang AR=llvm-ar RANLIB=llvm-ranlib --host=x86_64-w64-mingw32
+make -j$(nproc)
+
+mkdir nasm
+mv nasm.exe nasm/
+tar -acf nasm.tar.$COMPRESS_EXT nasm
+mkdir -p "$UPLOAD_DIR"
+cp nasm.tar.$COMPRESS_EXT "$UPLOAD_DIR"