Bug 1571562 - Use toolchain fetches instead of use_toolchain references in toolchain task definitions. r=nalexander
authorMike Hommey <mh+mozilla@glandium.org>
Sat, 03 Aug 2019 13:41:50 +0900
changeset 486712 6e250d97360841e61b62cfbd0483103eb9eb6a32
parent 486711 2499460f9d41848cc53db2a7a9ce9ab65288bf4f
child 486713 ee9072779abc7443d3b3e5a48889a5cf237fef16
push id91892
push usernerli@mozilla.com
push dateWed, 07 Aug 2019 10:09:17 +0000
treeherderautoland@5c3693e45bc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1571562
milestone70.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 1571562 - Use toolchain fetches instead of use_toolchain references in toolchain task definitions. r=nalexander And remove the use of tooltool-download where it's not needed anymore. Differential Revision: https://phabricator.services.mozilla.com/D40714
taskcluster/ci/toolchain/android.yml
taskcluster/ci/toolchain/cbindgen.yml
taskcluster/ci/toolchain/cctools-port.yml
taskcluster/ci/toolchain/clang-tidy.yml
taskcluster/ci/toolchain/clang.yml
taskcluster/ci/toolchain/dist-toolchains.yml
taskcluster/ci/toolchain/gcc.yml
taskcluster/ci/toolchain/gn.yml
taskcluster/ci/toolchain/grcov.yml
taskcluster/ci/toolchain/mingw.yml
taskcluster/ci/toolchain/minidump_stackwalk.yml
taskcluster/ci/toolchain/misc.yml
taskcluster/ci/toolchain/nasm.yml
taskcluster/ci/toolchain/rust-size.yml
taskcluster/ci/toolchain/sccache.yml
taskcluster/scripts/misc/android-gradle-dependencies.sh
taskcluster/scripts/misc/browsertime.sh
taskcluster/scripts/misc/build-cbindgen.sh
taskcluster/scripts/misc/build-cctools-port.sh
taskcluster/scripts/misc/build-clang-8-mingw.sh
taskcluster/scripts/misc/build-clang.sh
taskcluster/scripts/misc/build-dist-toolchains.sh
taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh
taskcluster/scripts/misc/build-gn-linux.sh
taskcluster/scripts/misc/build-grcov.sh
taskcluster/scripts/misc/build-hfsplus-linux.sh
taskcluster/scripts/misc/build-llvm-dsymutil.sh
taskcluster/scripts/misc/build-mar-tools.sh
taskcluster/scripts/misc/build-mingw-fxc2-x86.sh
taskcluster/scripts/misc/build-mingw32-nsis.sh
taskcluster/scripts/misc/build-minidump-stackwalk.sh
taskcluster/scripts/misc/build-nasm.sh
taskcluster/scripts/misc/build-rust-size.sh
taskcluster/scripts/misc/build-sccache.sh
taskcluster/scripts/misc/build-tup-linux.sh
taskcluster/scripts/misc/tooltool-download.sh
taskcluster/scripts/misc/wrench-deps-vendoring.sh
--- a/taskcluster/ci/toolchain/android.yml
+++ b/taskcluster/ci/toolchain/android.yml
@@ -46,21 +46,21 @@ linux64-android-gradle-dependencies:
         symbol: TL(gradle-dependencies)
     worker:
         env:
             GRADLE_USER_HOME: "/builds/worker/workspace/build/src/mobile/android/gradle/dotgradle-online"
     run:
         script: android-gradle-dependencies.sh
         sparse-profile: null
         resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
             - 'taskcluster/scripts/misc/android-gradle-dependencies/**'
             - '*.gradle'
             - 'mobile/android/**/*.gradle'
             - 'mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/**'
             - 'mobile/android/config/mozconfigs/common*'
             - 'mobile/android/gradle.configure'
         toolchain-artifact: public/build/android-gradle-dependencies.tar.xz
         toolchain-alias: android-gradle-dependencies
-    toolchains:
-        # Aliases aren't allowed for toolchains depending on toolchains.
-        - linux64-android-sdk-linux-repack
-        - linux64-node
+    fetches:
+        toolchain:
+            # Aliases aren't allowed for toolchains depending on toolchains.
+            - linux64-android-sdk-linux-repack
+            - linux64-node
--- a/taskcluster/ci/toolchain/cbindgen.yml
+++ b/taskcluster/ci/toolchain/cbindgen.yml
@@ -4,61 +4,62 @@
 ---
 job-defaults:
     description: "cbindgen toolchain build"
     worker-type: b-linux
     worker:
         max-run-time: 3600
     run:
         script: build-cbindgen.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/cbindgen.tar.xz
     fetches:
         fetch:
             # If you update this, make sure to update the minimum version in
             # build/moz.configure/bindgen.configure as well.
             - cbindgen-0.9.0
 
 linux64-cbindgen:
     treeherder:
         symbol: TL(cbindgen)
     worker:
         max-run-time: 1800
     run:
         arguments: ['x86_64-unknown-linux-gnu']
-    toolchains:
-        - linux64-rust-1.32
+    fetches:
+        toolchain:
+            - linux64-rust-1.32
 
 macosx64-cbindgen:
     treeherder:
         symbol: TM(cbindgen)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
     run-on-projects:
         - trunk
         - try
     run:
         arguments: ['x86_64-apple-darwin']
         resources:
             - taskcluster/scripts/misc/tooltool-download.sh
         tooltool-downloads: internal
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-llvm-dsymutil
-        - linux64-rust-macos-1.32
+    fetches:
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
+            - linux64-llvm-dsymutil
+            - linux64-rust-macos-1.32
 
 win64-cbindgen:
     treeherder:
         symbol: TW64(cbindgen)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
     run:
         arguments: ['x86_64-pc-windows-msvc']
         resources:
             - taskcluster/scripts/misc/tooltool-download.sh
         toolchain-artifact: public/build/cbindgen.tar.bz2
-    toolchains:
-        - win64-rust-1.34
+    fetches:
+        toolchain:
+            - win64-rust-1.34
--- a/taskcluster/ci/toolchain/cctools-port.yml
+++ b/taskcluster/ci/toolchain/cctools-port.yml
@@ -2,25 +2,23 @@
 # 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:
     description: "cctools-port toolchain build"
     worker-type: b-linux
     worker:
         max-run-time: 1800
-    run:
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
     fetches:
         fetch:
             - cctools-port
             - libtapi
 
 linux64-cctools-port:
     treeherder:
         symbol: TL(cctools)
     run:
         script: build-cctools-port.sh
         toolchain-artifact: public/build/cctools.tar.xz
-    toolchains:
-        - linux64-clang-8
-        - linux64-binutils
+    fetches:
+        toolchain:
+            - linux64-clang-8
+            - linux64-binutils
--- a/taskcluster/ci/toolchain/clang-tidy.yml
+++ b/taskcluster/ci/toolchain/clang-tidy.yml
@@ -32,19 +32,19 @@ linux64-clang-tidy:
     treeherder:
         symbol: TL(clang-tidy)
     run:
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-tidy-linux64.json'
         resources:
             - 'build/build-clang/clang-tidy-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
-    toolchains:
-        - linux64-gcc-6
+    fetches:
+        toolchain:
+            - linux64-gcc-6
 
 macosx64-clang-tidy:
     index:
         job-name: macosx64-clang-tidy
     treeherder:
         symbol: TM(clang-tidy)
     worker-type: b-linux-large
     worker:
@@ -54,21 +54,22 @@ macosx64-clang-tidy:
         using: toolchain-script
         script: build-clang.sh
         tooltool-downloads: internal
         arguments:
             - 'build/build-clang/clang-tidy-macosx64.json'
         resources:
             - 'build/build-clang/clang-tidy-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-gcc-6
-        - linux64-node
+    fetches:
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
+            - linux64-gcc-6
+            - linux64-node
 
 win64-clang-tidy:
     description: "Clang-tidy toolchain build"
     index:
         job-name: win64-clang-tidy
     treeherder:
         symbol: TW64(clang-tidy)
         tier: 2
--- a/taskcluster/ci/toolchain/clang.yml
+++ b/taskcluster/ci/toolchain/clang.yml
@@ -16,155 +16,148 @@ linux64-clang-4.0:
         symbol: TL(clang4.0)
     worker-type: b-linux-large
     run:
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-4.0-linux64.json'
         resources:
             - 'build/build-clang/clang-4.0-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-4.0
+        toolchain:
+            - linux64-gcc-6
 
 linux64-clang-7:
     description: "Clang 7 toolchain build"
     treeherder:
         symbol: TL(clang7)
     run:
         using: toolchain-script
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-7-linux64.json'
         resources:
             - 'build/build-clang/clang-7-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-7
+        toolchain:
+            - linux64-gcc-6
 
 linux64-clang-8:
     description: "Clang 8 toolchain build"
     treeherder:
         symbol: TL(clang8)
     run:
         using: toolchain-script
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-8-linux64.json'
         resources:
             - 'build/build-clang/clang-8-linux64.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-8
+        toolchain:
+            - linux64-gcc-6
 
 linux64-clang-8-mingw-x86:
     description: "MinGW-Clang Trunk x86 toolchain build"
     treeherder:
         symbol: TMW(clang-x86)
     run:
         script: build-clang-8-mingw.sh
         arguments:
             - 'x86'
             - 'build/build-clang/clang-8-mingw.json'
         resources:
             - 'build/build-clang/clang-8-mingw.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-mingw-x86
         toolchain-artifact: public/build/clangmingw.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-8
             - mingw-w64
             - libunwind
             - llvm-mingw
+        toolchain:
+            - linux64-gcc-6
 
 linux64-clang-8-mingw-x64:
     description: "MinGW-Clang Trunk x64 toolchain build"
     treeherder:
         symbol: TMW(clang-x64)
         tier: 1
     run:
         script: build-clang-8-mingw.sh
         arguments:
             - 'x64'
             - 'build/build-clang/clang-8-mingw.json'
         resources:
             - 'build/build-clang/clang-8-mingw.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-mingw-x64
         toolchain-artifact: public/build/clangmingw.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-8
             - mingw-w64
             - libunwind
             - llvm-mingw
+        toolchain:
+            - linux64-gcc-6
 
 linux64-clang-8-android-cross:
     description: "Clang 8 toolchain build"
     treeherder:
         symbol: TL(clang8-android)
     run:
         using: toolchain-script
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-8-android.json'
         resources:
             - 'build/build-clang/clang-8-android.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-android-cross
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-gcc-6
-        - linux64-android-ndk-linux-repack
     fetches:
         fetch:
             - clang-8
+        toolchain:
+            - linux64-gcc-6
+            - linux64-android-ndk-linux-repack
 
 linux64-clang-8-aarch64-cross:
     description: "Clang 8 toolchain build with aarch64 runtime"
     treeherder:
         symbol: TL(clang8-aarch64)
     worker-type: b-linux
     worker:
         max-run-time: 3600
         docker-image: {in-tree: toolchain-arm64-build}
     run:
         using: toolchain-script
         script: build-clang.sh
         arguments:
             - 'build/build-clang/clang-8-linux64-aarch64-cross.json'
         resources:
             - 'build/build-clang/clang-8-linux64-aarch64-cross.json'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-aarch64-cross
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-binutils
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-8
+        toolchain:
+            - linux64-binutils
+            - linux64-gcc-6
 
 linux64-clang-8-macosx-cross:
     description: "Clang 8 toolchain build with MacOS Compiler RT libs"
     treeherder:
         symbol: TL(clang8-macosx-cross)
     worker-type: b-linux
     worker:
         max-run-time: 3600
@@ -175,23 +168,23 @@ linux64-clang-8-macosx-cross:
         arguments:
             - 'build/build-clang/clang-8-macosx64.json'
         resources:
             - 'build/build-clang/clang-8-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-macosx-cross
         toolchain-artifact: public/build/clang.tar.xz
         tooltool-downloads: internal
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-gcc-6
     fetches:
         fetch:
             - clang-8
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
+            - linux64-gcc-6
 
 macosx64-clang:
     description: "Clang toolchain build"
     treeherder:
         symbol: TM(clang)
     worker-type: b-linux-large
     worker:
         max-run-time: 3600
@@ -204,24 +197,24 @@ macosx64-clang:
         script: build-clang.sh
         tooltool-downloads: internal
         arguments:
             - 'build/build-clang/clang-8-macosx64.json'
         resources:
             - 'build/build-clang/clang-8-macosx64.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/clang.tar.xz
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-gcc-6
-        - linux64-node
     fetches:
         fetch:
             - clang-8
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
+            - linux64-gcc-6
+            - linux64-node
 
 win64-clang-cl:
     description: "Clang-cl toolchain build"
     treeherder:
         symbol: TW64(clang-cl)
     worker-type: b-win2012
     worker:
         env:
--- a/taskcluster/ci/toolchain/dist-toolchains.yml
+++ b/taskcluster/ci/toolchain/dist-toolchains.yml
@@ -6,34 +6,34 @@ job-defaults:
     description: "sccache-dist toolchain archive build"
     worker-type: b-linux
     run-on-projects:
         - trunk
         - try
     run:
         using: toolchain-script
         script: build-dist-toolchains.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
 
 clang-dist-toolchain:
     treeherder:
         symbol: TL(clang-dist)
     worker:
         max-run-time: 1800
     run:
         arguments: ['clang']
         toolchain-artifact: public/build/clang-dist-toolchain.tar.xz
-    toolchains:
-        - linux64-clang-8
-        - linux64-sccache
+    fetches:
+        toolchain:
+            - linux64-clang-8
+            - linux64-sccache
 
 rustc-dist-toolchain:
     treeherder:
         symbol: TL(rustc-dist)
     worker:
         max-run-time: 1800
     run:
         arguments: ['rustc']
         toolchain-artifact: public/build/rustc-dist-toolchain.tar.xz
-    toolchains:
-        - linux64-rust-macos-1.36
-        - linux64-sccache
+    fetches:
+        toolchain:
+            - linux64-rust-macos-1.36
+            - linux64-sccache
--- a/taskcluster/ci/toolchain/gcc.yml
+++ b/taskcluster/ci/toolchain/gcc.yml
@@ -76,18 +76,18 @@ linux64-gcc-sixgill:
     description: "sixgill GCC plugin build"
     treeherder:
         symbol: TL(sixgill)
     run:
         script: build-gcc-sixgill-plugin-linux.sh
         resources:
             - 'taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh'
         toolchain-artifact: public/build/sixgill.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - binutils-2.31.1
             - isl-0.15
             - gcc-6.4.0
             - gmp-5.1.3
             - mpc-0.8.2
             - mpfr-3.1.5
+        toolchain:
+            - linux64-gcc-6
--- a/taskcluster/ci/toolchain/gn.yml
+++ b/taskcluster/ci/toolchain/gn.yml
@@ -6,48 +6,47 @@ job-defaults:
     description: "gn toolchain build"
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run-on-projects:
         - trunk
         - try
     run:
-        tooltool-downloads: public
         resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
             - 'taskcluster/scripts/misc/build-gn-common.sh'
         toolchain-artifact: public/build/gn.tar.xz
     fetches:
         fetch:
             - gn
 
 linux64-gn:
     treeherder:
         symbol: TL(gn)
     run:
         script: build-gn-linux.sh
-    toolchains:
-        - linux64-gcc-6
+    fetches:
+        toolchain:
+            - linux64-gcc-6
 
 macosx64-gn:
     treeherder:
         symbol: TM(gn)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
     run:
         script: build-gn-macosx.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-node
+    fetches:
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
 
 win32-gn:
     treeherder:
         symbol: TW64(gn)
     worker-type: b-win2012
     worker:
         max-run-time: 3600
         env:
--- a/taskcluster/ci/toolchain/grcov.yml
+++ b/taskcluster/ci/toolchain/grcov.yml
@@ -4,43 +4,44 @@
 ---
 job-defaults:
     description: "grcov toolchain build"
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
         script: build-grcov.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/grcov.tar.xz
     fetches:
         fetch:
             - grcov
 
 linux64-grcov:
     treeherder:
         symbol: TL(grcov)
-    toolchains:
-        - linux64-rust-1.32
+    fetches:
+        toolchain:
+            - linux64-rust-1.32
 
 macosx64-grcov:
     treeherder:
         symbol: TM(grcov)
     run-on-projects:
         - trunk
         - try
-    toolchains:
-        - linux64-rust-1.32
+    fetches:
+        toolchain:
+            - linux64-rust-1.32
 
 win64-grcov:
     treeherder:
         symbol: TW64(grcov)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
     run:
         toolchain-artifact: public/build/grcov.tar.bz2
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
-    toolchains:
-        - win64-rust-1.34
+    fetches:
+        toolchain:
+            - win64-rust-1.34
--- a/taskcluster/ci/toolchain/mingw.yml
+++ b/taskcluster/ci/toolchain/mingw.yml
@@ -48,30 +48,30 @@ linux64-mingw32-nsis:
     treeherder:
         symbol: TMW(mingw32-nsis)
     run:
         script: build-mingw32-nsis.sh
         resources:
             - 'build/unix/build-gcc/build-gcc.sh'
             - 'taskcluster/scripts/misc/build-gcc-mingw32.sh'
         toolchain-artifact: public/build/nsis.tar.xz
-    toolchains:
-        - linux64-mingw32-gcc
     fetches:
         fetch:
             - nsis-3.01
             - zlib-1.2.11
+        toolchain:
+            - linux64-mingw32-gcc
 
 linux64-mingw-fxc2-x86:
     description: "fxc2.exe x86 build for MinGW Cross Compile"
     treeherder:
         symbol: TMW(mingw-fxc2-x86)
     worker:
         max-run-time: 1800
     run:
         using: toolchain-script
         script: build-mingw-fxc2-x86.sh
         toolchain-artifact: public/build/fxc2.tar.xz
-    toolchains:
-        - linux64-clang-8-mingw-x86
     fetches:
         fetch:
             - fxc2
+        toolchain:
+            - linux64-clang-8-mingw-x86
--- a/taskcluster/ci/toolchain/minidump_stackwalk.yml
+++ b/taskcluster/ci/toolchain/minidump_stackwalk.yml
@@ -10,54 +10,56 @@ job-defaults:
     run:
         script: build-minidump-stackwalk.sh
         sparse-profile: null
         resources:
             - 'build/moz.configure'
             - 'config/external/zlib'
             - 'mfbt'
             - 'moz.configure'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
             - 'testing/tools/fileid'
             - 'toolkit/crashreporter'
             - 'toolkit/crashreporter/google-breakpad/src/common'
             - 'toolkit/crashreporter/google-breakpad/src/processor'
             - 'toolkit/crashreporter/rust'
             - 'tools/crashreporter/'
         toolchain-artifact: public/build/minidump_stackwalk.tar.xz
     run-on-projects:
         - trunk
         - try
 
 linux64-minidump-stackwalk:
     treeherder:
         symbol: TL(stackwalk)
-    toolchains:
-        - linux64-clang-8
-        - linux64-binutils
-        - linux64-rust-1.31
+    fetches:
+        toolchain:
+            - linux64-clang-8
+            - linux64-binutils
+            - linux64-rust-1.31
 
 macosx64-minidump-stackwalk:
     treeherder:
         symbol: TM(stackwalk)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/macosx64/cross-clang.manifest"
     run:
         arguments: ['macosx64']
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
-    toolchains:
-        - linux64-cctools-port
-        - linux64-clang-8
-        - linux64-rust-macos-1.31
+    fetches:
+        toolchain:
+            - linux64-cctools-port
+            - linux64-clang-8
+            - linux64-rust-macos-1.31
 
 win32-minidump-stackwalk:
     treeherder:
         symbol: TW32(stackwalk)
     worker:
         docker-image: {in-tree: mingw32-build}
     run:
         arguments: ['mingw32']
-    toolchains:
-        - linux64-clang-8-mingw-x86
-        - mingw32-rust-1.31
+    fetches:
+        toolchain:
+            - linux64-clang-8-mingw-x86
+            - mingw32-rust-1.31
--- a/taskcluster/ci/toolchain/misc.yml
+++ b/taskcluster/ci/toolchain/misc.yml
@@ -26,21 +26,21 @@ linux64-infer:
 
 linux64-llvm-dsymutil:
     description: "llvm-dsymutil toolchain build"
     treeherder:
         symbol: TL(dsymutil)
     run:
         script: build-llvm-dsymutil.sh
         toolchain-artifact: public/build/llvm-dsymutil.tar.xz
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - llvm-for-dsymutil
+        toolchain:
+            - linux64-gcc-6
 
 linux64-binutils:
     description: "Binutils toolchain build"
     treeherder:
         symbol: TL(binutil)
     worker:
         max-run-time: 3600
     run:
@@ -55,42 +55,42 @@ linux64-binutils:
 linux64-hfsplus:
     description: "hfsplus toolchain build"
     treeherder:
         symbol: TL(hfs+)
     run:
         script: build-hfsplus-linux.sh
         resources:
             - 'build/unix/build-hfsplus/build-hfsplus.sh'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/hfsplus-tools.tar.xz
-    toolchains:
-        - linux64-clang-8
     fetches:
         fetch:
             - hfsplus-tools
+        toolchain:
+            - linux64-clang-8
 
 linux64-libdmg:
     description: "libdmg-hfsplus toolchain build"
     treeherder:
         symbol: TL(libdmg-hfs+)
     run:
         script: build-libdmg-hfsplus.sh
         toolchain-artifact: public/build/dmg.tar.xz
     fetches:
         fetch:
             - libdmg-hfsplus
 
 linux64-mar-tools:
     description: "mar-tools toolchain build"
     treeherder:
         symbol: TL(mar-tools)
-    toolchains:
-        - linux64-clang-7
-        - linux64-binutils
+    fetches:
+        toolchain:
+            - linux64-clang-7
+            - linux64-binutils
     run:
         script: build-mar-tools.sh
         sparse-profile: null
         toolchain-artifact: public/build/mar-tools.tar.xz
         resources:
             - build/moz.configure
             - mfbt
             - modules/libmar/
@@ -103,27 +103,25 @@ linux64-mar-tools:
 linux64-tup:
     description: "tup toolchain build"
     treeherder:
         symbol: TL(tup)
     worker:
         max-run-time: 3600
     run:
         script: build-tup-linux.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/tup.tar.xz
     run-on-projects:
         - trunk
         - try
-    toolchains:
-        - linux64-gcc-6
     fetches:
         fetch:
             - tup
+        toolchain:
+            - linux64-gcc-6
 
 linux64-upx:
     description: "UPX build"
     treeherder:
         symbol: TL(upx)
         tier: 1
     run:
         script: build-upx.sh
@@ -151,29 +149,29 @@ browsertime:
         symbol: TL(browsertime)
     run:
         script: browsertime.sh
         sparse-profile: null
         resources:
             - 'tools/browsertime/package.json'
             - 'tools/browsertime/mach_commands.py'
         toolchain-artifact: public/build/browsertime.zip
-    toolchains:
-        - linux64-node
+    fetches:
+        toolchain:
+            - linux64-node
 
 wrench-deps:
     description: "Downloads all the crates needed for building wrench"
     treeherder:
         symbol: WR(wrench-deps)
     worker:
         docker-image: {in-tree: webrender}
     run:
         script: wrench-deps-vendoring.sh
         sparse-profile: null  # need all of gfx/wr checked out for this script
         resources:
             - 'gfx/wr/Cargo.lock'
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/wrench-deps.tar.bz2
-    toolchains:
-        - linux64-rust-1.36  # whatever m-c is built with
     fetches:
         fetch:
             - android-rs-glue
+        toolchain:
+            - linux64-rust-1.36  # whatever m-c is built with
--- a/taskcluster/ci/toolchain/nasm.yml
+++ b/taskcluster/ci/toolchain/nasm.yml
@@ -2,34 +2,32 @@
 # 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:
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/nasm.tar.bz2
 
 win64-nasm:
     description: "nasm win64 build"
     treeherder:
         symbol: TW64(nasm)
     worker:
         docker-image: {in-tree: mingw32-build}
     run:
         script: build-nasm.sh
         arguments: ['win64']
-    toolchains:
-        - linux64-clang-8-mingw-x64
     fetches:
         fetch:
             - nasm-2.14.02
+        toolchain:
+            - linux64-clang-8-mingw-x64
 
 linux64-nasm:
     description: "nasm linux64 build"
     treeherder:
         symbol: TL(nasm)
     run:
         script: build-nasm.sh
         arguments: ['linux64']
--- a/taskcluster/ci/toolchain/rust-size.yml
+++ b/taskcluster/ci/toolchain/rust-size.yml
@@ -3,36 +3,36 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     description: "rust-size toolchain build"
     worker:
         max-run-time: 1800
     run:
         script: build-rust-size.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
     fetches:
         fetch:
             - rust-size
 
 linux64-rust-size:
     treeherder:
         symbol: TL(rust-size)
     worker-type: b-linux
     run:
         toolchain-artifact: public/build/rust-size.tar.xz
-    toolchains:
-        - linux64-rust-1.28
+    fetches:
+        toolchain:
+            - linux64-rust-1.28
 
 win64-rust-size:
     treeherder:
         symbol: TW64(rust-size)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
     run:
         toolchain-artifact: public/build/rust-size.tar.bz2
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
-    toolchains:
-        - win64-rust-1.28
+    fetches:
+        toolchain:
+            - win64-rust-1.28
--- a/taskcluster/ci/toolchain/sccache.yml
+++ b/taskcluster/ci/toolchain/sccache.yml
@@ -4,36 +4,34 @@
 ---
 job-defaults:
     description: "sccache toolchain build"
     treeherder:
         symbol: TL(sccache)
     run:
         using: toolchain-script
         script: build-sccache.sh
-        resources:
-            - 'taskcluster/scripts/misc/tooltool-download.sh'
     fetches:
         fetch:
             - sccache
 
 linux64-sccache:
     treeherder:
         symbol: TL(sccache)
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
         toolchain-artifact: public/build/sccache.tar.xz
-    toolchains:
-        - linux64-rust-1.34
-        - linux64-binutils
     fetches:
         fetch:
             - openssl-1.1.0g
+        toolchain:
+            - linux64-rust-1.34
+            - linux64-binutils
 
 macosx64-sccache:
     treeherder:
         symbol: TM(sccache)
     worker-type: b-linux
     worker:
         max-run-time: 1800
         env:
@@ -42,29 +40,31 @@ macosx64-sccache:
         - trunk
         - try
     run:
         arguments: ['x86_64-apple-darwin']
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
         toolchain-artifact: public/build/sccache.tar.xz
-    toolchains:
-        - linux64-rust-macos-1.34
-        - linux64-clang-8
-        - linux64-cctools-port
-        - linux64-llvm-dsymutil
-        - linux64-binutils
+    fetches:
+        toolchain:
+            - linux64-rust-macos-1.34
+            - linux64-clang-8
+            - linux64-cctools-port
+            - linux64-llvm-dsymutil
+            - linux64-binutils
 
 win64-sccache:
     treeherder:
         symbol: TW64(sccache)
     worker-type: b-win2012
     worker:
         max-run-time: 3600
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
     run:
         toolchain-artifact: public/build/sccache.tar.bz2
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
-    toolchains:
-        - win64-rust-1.34
+    fetches:
+        toolchain:
+            - win64-rust-1.34
--- a/taskcluster/scripts/misc/android-gradle-dependencies.sh
+++ b/taskcluster/scripts/misc/android-gradle-dependencies.sh
@@ -3,18 +3,15 @@
 set -x -e
 
 echo "running as" $(id)
 
 set -v
 
 cd $GECKO_PATH
 
-# Download toolchain artifacts.
-. taskcluster/scripts/misc/tooltool-download.sh
-
 . taskcluster/scripts/misc/android-gradle-dependencies/before.sh
 
 export MOZCONFIG=mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/nightly
 ./mach build
 ./mach android gradle-dependencies
 
 . taskcluster/scripts/misc/android-gradle-dependencies/after.sh
--- a/taskcluster/scripts/misc/browsertime.sh
+++ b/taskcluster/scripts/misc/browsertime.sh
@@ -3,19 +3,16 @@
 set -x -e
 
 echo "running as" $(id)
 
 set -v
 
 cd $GECKO_PATH
 
-# Download toolchain artifacts.
-. taskcluster/scripts/misc/tooltool-download.sh
-
 export PATH=$PATH:$MOZ_FETCHES_DIR/node/bin
 
 # We don't install ImageMagick, so this will fail.  Continue.
 ./mach browsertime --setup || true
 
 # We have tools/browsertime/{package.json,node_modules,...} and want
 # browsertime/{package.json,node_modules}.  ZIP because generic-worker
 # doesn't support .tar.xz.
--- a/taskcluster/scripts/misc/build-cbindgen.sh
+++ b/taskcluster/scripts/misc/build-cbindgen.sh
@@ -14,17 +14,19 @@ MINGW*)
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
 
     export CC=clang-cl
     ;;
 esac
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 # OSX cross builds are a bit harder
 if [ "$TARGET" == "x86_64-apple-darwin" ]; then
   export PATH="$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH"
   export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH"
   cat >cross-linker <<EOF
 exec $MOZ_FETCHES_DIR/clang/bin/clang -v \
   -fuse-ld=$MOZ_FETCHES_DIR/cctools/bin/x86_64-apple-darwin-ld \
--- a/taskcluster/scripts/misc/build-cctools-port.sh
+++ b/taskcluster/scripts/misc/build-cctools-port.sh
@@ -16,19 +16,17 @@ CROSSTOOLS_CCTOOLS_DIR=$CROSSTOOLS_SOURC
 CROSSTOOLS_BUILD_DIR=$WORKSPACE/cctools
 LIBTAPI_SOURCE_DIR=$MOZ_FETCHES_DIR/apple-libtapi
 LIBTAPI_BUILD_DIR=$WORKSPACE/libtapi-build
 CLANG_DIR=$MOZ_FETCHES_DIR/clang
 
 # Create our directories
 mkdir -p $CROSSTOOLS_BUILD_DIR $LIBTAPI_BUILD_DIR
 
-# Fetch clang from tooltool
 cd $GECKO_PATH
-. taskcluster/scripts/misc/tooltool-download.sh
 
 export PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
 
 # Common setup for libtapi and cctools
 export CC=$CLANG_DIR/bin/clang
 export CXX=$CLANG_DIR/bin/clang++
 # We also need this LD_LIBRARY_PATH at build time, since tapi builds bits of
 # clang build tools, and then executes those tools.
--- a/taskcluster/scripts/misc/build-clang-8-mingw.sh
+++ b/taskcluster/scripts/misc/build-clang-8-mingw.sh
@@ -28,17 +28,16 @@ CROSS_PREFIX_DIR=$INSTALL_DIR/$machine-w
 make_flags="-j$(nproc)"
 
 # This is default value of _WIN32_WINNT. Gecko configure script explicitly sets this,
 # so this is not used to build Gecko itself. We default to 0x601, which is Windows 7.
 default_win32_winnt=0x601
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
 patch_file="$(pwd)/taskcluster/scripts/misc/mingw-winrt.patch"
 
 prepare() {
   pushd $MOZ_FETCHES_DIR/mingw-w64
   patch -p1 <$patch_file
   popd
 }
 
--- a/taskcluster/scripts/misc/build-clang.sh
+++ b/taskcluster/scripts/misc/build-clang.sh
@@ -3,17 +3,19 @@ set -x -e -v
 
 # This script is for building clang.
 
 ORIGPWD="$PWD"
 JSON_CONFIG="$1"
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 if [ -d "$MOZ_FETCHES_DIR/binutils/bin" ]; then
   export PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
 fi
 
 case "$JSON_CONFIG" in
 *macosx64*)
   # these variables are used in build-clang.py
--- a/taskcluster/scripts/misc/build-dist-toolchains.sh
+++ b/taskcluster/scripts/misc/build-dist-toolchains.sh
@@ -1,11 +1,9 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for packaging toolchains suitable for use by distributed sccache.
 TL_NAME="$1"
 
-cd $GECKO_PATH
-
-. taskcluster/scripts/misc/tooltool-download.sh
+mkdir -p $HOME/artifacts
 
 $MOZ_FETCHES_DIR/sccache/sccache --package-toolchain $MOZ_FETCHES_DIR/$TL_NAME/bin/$TL_NAME $HOME/artifacts/$TL_NAME-dist-toolchain.tar.xz
--- a/taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh
+++ b/taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh
@@ -6,19 +6,16 @@ set -x
 # This script is for building the sixgill GCC plugin for Linux. It relies on
 # the gcc checkout because it needs to recompile gmp and the gcc build script
 # determines the version of gmp to download.
 
 root_dir=$MOZ_FETCHES_DIR
 build_dir=$GECKO_PATH/build
 data_dir=$GECKO_PATH/build/unix/build-gcc
 
-# Download and unpack upstream toolchain artifacts (ie, the gcc binary).
-. $(dirname $0)/tooltool-download.sh
-
 gcc_version=6.4.0
 gcc_ext=xz
 binutils_version=2.28.1
 binutils_ext=xz
 sixgill_rev=bc0ef9258470
 sixgill_repo=https://hg.mozilla.org/users/sfink_mozilla.com/sixgill
 
 . $data_dir/build-gcc.sh
--- a/taskcluster/scripts/misc/build-gn-linux.sh
+++ b/taskcluster/scripts/misc/build-gn-linux.sh
@@ -13,10 +13,9 @@ export LDFLAGS=-lrt
 # the worker and cause failures. Work around this by putting python2.7
 # ahead of it in PATH.
 mkdir -p $WORKSPACE/python_bin
 ln -s /usr/bin/python2.7 $WORKSPACE/python_bin/python
 export PATH=$WORKSPACE/python_bin:$PATH
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
 . taskcluster/scripts/misc/build-gn-common.sh
--- a/taskcluster/scripts/misc/build-grcov.sh
+++ b/taskcluster/scripts/misc/build-grcov.sh
@@ -15,17 +15,19 @@ MINGW*)
     COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 # cargo gets mad if the parent directory has a Cargo.toml file in it
 if [ -e Cargo.toml ]; then
   mv Cargo.toml Cargo.toml.back
 fi
 
 PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
 
--- a/taskcluster/scripts/misc/build-hfsplus-linux.sh
+++ b/taskcluster/scripts/misc/build-hfsplus-linux.sh
@@ -1,16 +1,14 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building hfsplus for Linux.
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
-
 export PATH=$PATH:$MOZ_FETCHES_DIR/clang/bin
 
 build/unix/build-hfsplus/build-hfsplus.sh $MOZ_FETCHES_DIR
 
 # Put a tarball in the artifacts dir
 mkdir -p $UPLOAD_DIR
 cp $MOZ_FETCHES_DIR/hfsplus-tools.tar.* $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-llvm-dsymutil.sh
+++ b/taskcluster/scripts/misc/build-llvm-dsymutil.sh
@@ -1,17 +1,15 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building clang for Linux.
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
-
 cd $MOZ_FETCHES_DIR/llvm-project/llvm
 
 mkdir build
 cd build
 
 cmake \
   -GNinja \
   -DCMAKE_BUILD_TYPE=Release \
--- a/taskcluster/scripts/misc/build-mar-tools.sh
+++ b/taskcluster/scripts/misc/build-mar-tools.sh
@@ -2,18 +2,16 @@
 set -x -e -v
 
 # This script is for building mar and mbsdiff
 
 COMPRESS_EXT=xz
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
-
 export MOZ_OBJDIR=obj-mar
 
 echo ac_add_options --enable-project=tools/update-packaging > .mozconfig
 
 TOOLCHAINS="binutils clang"
 
 for t in $TOOLCHAINS; do
     PATH="$MOZ_FETCHES_DIR/$t/bin:$PATH"
--- a/taskcluster/scripts/misc/build-mingw-fxc2-x86.sh
+++ b/taskcluster/scripts/misc/build-mingw-fxc2-x86.sh
@@ -1,18 +1,16 @@
 #!/bin/bash
 set -x -e -v
 
 WORKSPACE=$HOME/workspace
 INSTALL_DIR=$WORKSPACE/fxc2
 
 mkdir -p $INSTALL_DIR/bin
 
-cd $GECKO_PATH
-. taskcluster/scripts/misc/tooltool-download.sh
 export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH"
 
 # --------------
 
 cd $MOZ_FETCHES_DIR/fxc2
 make -j$(nproc) x86
 
 cp fxc2.exe $INSTALL_DIR/bin/
--- a/taskcluster/scripts/misc/build-mingw32-nsis.sh
+++ b/taskcluster/scripts/misc/build-mingw32-nsis.sh
@@ -10,26 +10,23 @@ set -x -e -v
 #   DEBUG: | Error: opening stub "/home/worker/workspace/mingw32/
 #   DEBUG: | Error initalizing CEXEBuild: error setting
 #   ERROR: Failed to get nsis version.
 
 INSTALL_DIR=$GECKO_PATH/mingw32
 
 mkdir -p $INSTALL_DIR
 
-cd $GECKO_PATH
-. taskcluster/scripts/misc/tooltool-download.sh
-# After tooltool runs, we move the stuff we just downloaded.
 # As explained above, we have to build nsis to the directory it
 # will eventually be run from, which is the same place we just
 # installed our compiler. But at the end of the script we want
 # to package up what we just built. If we don't move the compiler,
 # we will package up the compiler we downloaded along with the
 # stuff we just built.
-mv $MOZ_FETCHES_DIR/mingw32 mingw32-gcc
+mv $MOZ_FETCHES_DIR/mingw32 $GECKO_PATH/mingw32-gcc
 export PATH="$GECKO_PATH/mingw32-gcc/bin:$PATH"
 
 cd $MOZ_FETCHES_DIR
 
 # --------------
 
 cd zlib-1.2.11
 make -f win32/Makefile.gcc PREFIX=i686-w64-mingw32-
--- a/taskcluster/scripts/misc/build-minidump-stackwalk.sh
+++ b/taskcluster/scripts/misc/build-minidump-stackwalk.sh
@@ -2,17 +2,19 @@
 set -x -e -v
 
 # This script is for building minidump_stackwalk
 
 COMPRESS_EXT=xz
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 export MOZ_OBJDIR=obj-minidump
 
 echo ac_add_options --enable-project=tools/crashreporter > .mozconfig
 
 MINIDUMP_STACKWALK=minidump_stackwalk
 
 case "$1" in
--- a/taskcluster/scripts/misc/build-nasm.sh
+++ b/taskcluster/scripts/misc/build-nasm.sh
@@ -1,17 +1,13 @@
 #!/bin/bash
 set -x -e -v
 
 COMPRESS_EXT=bz2
 
-cd $GECKO_PATH
-
-. taskcluster/scripts/misc/tooltool-download.sh
-
 cd $MOZ_FETCHES_DIR/nasm-*
 case "$1" in
     win64)
         export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH"
         ./configure CC=x86_64-w64-mingw32-clang AR=llvm-ar RANLIB=llvm-ranlib --host=x86_64-w64-mingw32
         EXE=.exe
         ;;
     *)
--- a/taskcluster/scripts/misc/build-rust-size.sh
+++ b/taskcluster/scripts/misc/build-rust-size.sh
@@ -13,17 +13,19 @@ MINGW*)
     COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 # cargo gets mad if the parent directory has a Cargo.toml file in it
 if [ -e Cargo.toml ]; then
   mv Cargo.toml Cargo.toml.back
 fi
 
 PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
 
--- a/taskcluster/scripts/misc/build-sccache.sh
+++ b/taskcluster/scripts/misc/build-sccache.sh
@@ -15,17 +15,19 @@ MINGW*)
     COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
-. taskcluster/scripts/misc/tooltool-download.sh
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
 
 PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
 
 cd $MOZ_FETCHES_DIR/sccache
 
 case "$(uname -s)" in
 Linux)
     if [ "$TARGET" == "x86_64-apple-darwin" ]; then
--- a/taskcluster/scripts/misc/build-tup-linux.sh
+++ b/taskcluster/scripts/misc/build-tup-linux.sh
@@ -1,20 +1,16 @@
 #!/bin/bash
 set -e -v
 
 # This script is for building tup on Linux.
 
 COMPRESS_EXT=xz
 export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH
 
-cd $GECKO_PATH
-
-. taskcluster/scripts/misc/tooltool-download.sh
-
 cd $MOZ_FETCHES_DIR/tup
 
 patch -p1 <<'EOF'
 diff --git a/src/tup/link.sh b/src/tup/link.sh
 index ed9a01c6..4ecc6d7d 100755
 --- a/src/tup/link.sh
 +++ b/src/tup/link.sh
 @@ -4,7 +4,7 @@
--- a/taskcluster/scripts/misc/tooltool-download.sh
+++ b/taskcluster/scripts/misc/tooltool-download.sh
@@ -25,11 +25,22 @@ fi
 
 if [ -n "$UPLOAD_DIR" ]; then
     TOOLTOOL_DL_FLAGS="${TOOLTOOL_DL_FLAGS=} --artifact-manifest $UPLOAD_DIR/toolchains.json"
 fi
 
 : TOOLTOOL_CACHE                ${TOOLTOOL_CACHE:=/builds/worker/tooltool-cache}
 export TOOLTOOL_CACHE
 
-${GECKO_PATH}/mach artifact toolchain -v${TOOLTOOL_DL_FLAGS}${TOOLTOOL_MANIFEST:+ --tooltool-manifest "${GECKO_PATH}/${TOOLTOOL_MANIFEST}"}${TOOLTOOL_CACHE:+ --cache-dir ${TOOLTOOL_CACHE}} --retry 5${MOZ_TOOLCHAINS:+ ${MOZ_TOOLCHAINS}}
+if [ -n "$MOZ_TOOLCHAINS" ]; then
+    echo This script should not be used for toolchain downloads anymore
+    echo Use fetches
+    exit 1
+fi
+
+if [ -z "$TOOLTOOL_MANIFEST" ]; then
+    echo This script should not be used when there is no tooltool manifest set
+    exit 1
+fi
+
+${GECKO_PATH}/mach artifact toolchain -v${TOOLTOOL_DL_FLAGS} --tooltool-manifest "${GECKO_PATH}/${TOOLTOOL_MANIFEST}"${TOOLTOOL_CACHE:+ --cache-dir ${TOOLTOOL_CACHE}} --retry 5
 
 cd $OLDPWD
--- a/taskcluster/scripts/misc/wrench-deps-vendoring.sh
+++ b/taskcluster/scripts/misc/wrench-deps-vendoring.sh
@@ -4,17 +4,16 @@ set -x -e -v
 # This scripts uses `cargo-vendor` to download all the dependencies needed
 # to build `wrench` (a tool used for standalone testing of webrender), and
 # exports those dependencies as a tarball. This avoids having to download
 # these dependencies on every test job that uses `wrench`.
 
 UPLOAD_DIR=$HOME/artifacts
 
 cd $GECKO_PATH
-. taskcluster/scripts/misc/tooltool-download.sh
 export PATH=$PATH:$MOZ_FETCHES_DIR/rustc/bin
 cargo install --version 0.1.23 cargo-vendor
 cd gfx/wr/
 mkdir .cargo
 cargo vendor --relative-path --sync ./Cargo.lock > .cargo/config
 mkdir wrench-deps
 mv vendor .cargo wrench-deps/
 mkdir wrench-deps/cargo-apk