Bug 1729406 - Use .tar.zst for most toolchain artifacts. r=firefox-build-system-reviewers,andi
☠☠ backed out by 10e5b35f46b0 ☠ ☠
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 08 Sep 2021 08:00:54 +0000
changeset 591282 2b28ac860723e3fabdf86ad04d6a81601241d685
parent 591281 89c9940d74020fc36e57b68157ed517b16e7a719
child 591283 816417dd60fb94cfda06c4d2eeb74bcc482aa306
push id38773
push usersmolnar@mozilla.com
push dateWed, 08 Sep 2021 21:39:05 +0000
treeherdermozilla-central@a72096bff057 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, andi
bugs1729406
milestone94.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 1729406 - Use .tar.zst for most toolchain artifacts. r=firefox-build-system-reviewers,andi We leave the following ones unchanged: - geckodriver because the results are used to releases on github. - sixgill because the script that creates it is not in-tree. - *-dist-toolchain because sccache is not expecting a .tar.zst. We use native tar support in most cases, except for toolchain scripts also used on Windows, for which we use our zstdpy script. Differential Revision: https://phabricator.services.mozilla.com/D124733
build/build-infer/build-infer.py
build/unix/build-binutils/build-binutils.sh
build/unix/build-gcc/build-gcc.sh
build/unix/build-hfsplus/build-hfsplus.sh
taskcluster/ci/toolchain/cbindgen.yml
taskcluster/ci/toolchain/cctools-port.yml
taskcluster/ci/toolchain/dump-syms.yml
taskcluster/ci/toolchain/fix-stacks.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/resourcemonitor.yml
taskcluster/ci/toolchain/rust-size.yml
taskcluster/ci/toolchain/sccache.yml
taskcluster/docker/custom-v8/Dockerfile
taskcluster/scripts/misc/browsertime.sh
taskcluster/scripts/misc/build-breakpad-injector.sh
taskcluster/scripts/misc/build-cbindgen.sh
taskcluster/scripts/misc/build-cctools-port.sh
taskcluster/scripts/misc/build-custom-v8.sh
taskcluster/scripts/misc/build-dump-syms.sh
taskcluster/scripts/misc/build-fix-stacks.sh
taskcluster/scripts/misc/build-gn-common.sh
taskcluster/scripts/misc/build-gn-linux.sh
taskcluster/scripts/misc/build-gn-macosx.sh
taskcluster/scripts/misc/build-grcov.sh
taskcluster/scripts/misc/build-libdmg-hfsplus.sh
taskcluster/scripts/misc/build-liblowercase.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-mozmake.sh
taskcluster/scripts/misc/build-nasm.sh
taskcluster/scripts/misc/build-resourcemonitor.sh
taskcluster/scripts/misc/build-rust-size.sh
taskcluster/scripts/misc/build-sccache.sh
taskcluster/scripts/misc/build-upx.sh
taskcluster/scripts/misc/build-winchecksec.sh
taskcluster/scripts/misc/build-wine.sh
taskcluster/scripts/misc/exfiltrate-pdbstr.sh
taskcluster/scripts/misc/wrench-deps-vendoring.sh
--- a/build/build-infer/build-infer.py
+++ b/build/build-infer/build-infer.py
@@ -26,17 +26,17 @@ def run_in(path, args, extra_env=None):
     check_run(args, path)
     subprocess.run(args, cwd=path)
 
 
 def build_tar_package(tar, name, base, directories):
     name = os.path.realpath(name)
     run_in(
         base,
-        [tar, "-c", "-%s" % ("J" if ".xz" in name else "j"), "-f", name] + directories,
+        [tar, "-c", "-a", "-f", name] + directories,
     )
 
 
 def is_git_repo(dir):
     """Check whether the given directory is a git repository."""
     from subprocess import CalledProcessError
 
     try:
@@ -137,16 +137,16 @@ if __name__ == "__main__":
     infer_package_with_pref = os.path.join(infer_package, "usr")
     if not args.skip_tar:
         os.rename(
             os.path.join(infer_package_with_pref, "local"),
             os.path.join(infer_package_with_pref, "infer"),
         )
         build_tar_package(
             "tar",
-            "%s.tar.xz" % (package_name),
+            "%s.tar.zst" % (package_name),
             infer_package_with_pref,
             [
                 os.path.join("infer", "bin"),
                 os.path.join("infer", "lib"),
                 os.path.join("infer", "share"),
             ],
         )
--- a/build/unix/build-binutils/build-binutils.sh
+++ b/build/unix/build-binutils/build-binutils.sh
@@ -93,9 +93,9 @@ cd binutils-objdir
 ../binutils-source/configure --prefix /tools/binutils/ --enable-gold --enable-plugins --disable-nls --enable-targets="$TARGETS" $EXTRA_CONFIGURE_FLAGS || exit 1
 make $make_flags || exit 1
 make install $make_flags DESTDIR=$root_dir || exit 1
 
 cd ..
 
 # Make a package of the built binutils
 cd $root_dir/tools
-tar caf $root_dir/binutils.tar.xz binutils/
+tar caf $root_dir/binutils.tar.zst binutils/
--- a/build/unix/build-gcc/build-gcc.sh
+++ b/build/unix/build-gcc/build-gcc.sh
@@ -68,17 +68,17 @@ build_gcc() {
   fi
   ../gcc-source/configure --prefix=${prefix-/tools/gcc} --build=x86_64-unknown-linux-gnu --target="${target}" --enable-languages=c,c++  --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro --with-sysroot=/ $EXTRA_CONFIGURE_FLAGS
   make $make_flags
   make $make_flags install DESTDIR=$root_dir
 
   cd $root_dir/tools
   ln -s gcc gcc/bin/cc
 
-  tar caf $root_dir/gcc.tar.xz gcc/
+  tar caf $root_dir/gcc.tar.zst gcc/
   popd
 }
 
 build_gcc_and_mingw() {
   mkdir gcc-objdir
   pushd gcc-objdir
   ../gcc-source/configure --prefix=$install_dir --target=i686-w64-mingw32 --with-gnu-ld --with-gnu-as --disable-multilib --enable-threads=posix
   make $make_flags all-gcc
@@ -113,11 +113,11 @@ build_gcc_and_mingw() {
   mkdir widl32
   pushd widl32
   ../mingw-w64/mingw-w64-tools/widl/configure --prefix=$install_dir --target=i686-w64-mingw32
   make
   make install
   popd
 
   pushd $(dirname $install_dir)
-  tar caf $root_dir/mingw32.tar.xz $(basename $install_dir)/
+  tar caf $root_dir/mingw32.tar.zst $(basename $install_dir)/
   popd
 }
--- a/build/unix/build-hfsplus/build-hfsplus.sh
+++ b/build/unix/build-hfsplus/build-hfsplus.sh
@@ -41,9 +41,9 @@ cd ..
 
 mkdir hfsplus-tools
 cp $dirname/newfs_hfs.tproj/newfs_hfs hfsplus-tools/newfs_hfs
 ## XXX fsck_hfs is unused, but is small and built from the package.
 cp $dirname/fsck_hfs.tproj/fsck_hfs hfsplus-tools/fsck_hfs
 
 # Make a package of the built utils
 cd $root_dir
-tar caf $root_dir/hfsplus-tools.tar.xz hfsplus-tools
+tar caf $root_dir/hfsplus-tools.tar.zst hfsplus-tools
--- a/taskcluster/ci/toolchain/cbindgen.yml
+++ b/taskcluster/ci/toolchain/cbindgen.yml
@@ -6,17 +6,17 @@ job-defaults:
     description: "cbindgen toolchain build"
     attributes:
         local-toolchain: true
     worker-type: b-linux
     worker:
         max-run-time: 3600
     run:
         script: build-cbindgen.sh
-        toolchain-artifact: public/build/cbindgen.tar.xz
+        toolchain-artifact: public/build/cbindgen.tar.zst
     run-on-projects: [trunk]
     fetches:
         fetch:
             # If you update this, make sure to update the minimum version in
             # build/moz.configure/bindgen.configure as well.
             - cbindgen-0.19.0
 
 linux64-cbindgen:
@@ -64,13 +64,12 @@ win64-cbindgen:
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
         arguments: ['x86_64-pc-windows-msvc']
         resources:
             - taskcluster/scripts/misc/tooltool-download.sh
-        toolchain-artifact: public/build/cbindgen.tar.bz2
         tooltool-downloads: internal
     fetches:
         toolchain:
             - win64-rust-1.47
--- a/taskcluster/ci/toolchain/cctools-port.yml
+++ b/taskcluster/ci/toolchain/cctools-port.yml
@@ -13,27 +13,27 @@ job-defaults:
             - libtapi
             - ldid
 
 linux64-cctools-port-clang-11:
     treeherder:
         symbol: TL(cctools-clang-11)
     run:
         script: build-cctools-port.sh
-        toolchain-artifact: public/build/cctools.tar.xz
+        toolchain-artifact: public/build/cctools.tar.zst
         tooltool-downloads: internal
     fetches:
         toolchain:
             - linux64-clang-11
             - linux64-binutils
 
 linux64-cctools-port-clang-12:
     treeherder:
         symbol: TL(cctools-clang-12)
     run:
         script: build-cctools-port.sh
         toolchain-alias: linux64-cctools-port
-        toolchain-artifact: public/build/cctools.tar.xz
+        toolchain-artifact: public/build/cctools.tar.zst
         tooltool-downloads: internal
     fetches:
         toolchain:
             - linux64-clang-12
             - linux64-binutils
--- a/taskcluster/ci/toolchain/dump-syms.yml
+++ b/taskcluster/ci/toolchain/dump-syms.yml
@@ -15,61 +15,61 @@ job-defaults:
         fetch:
             - dump-syms
 
 linux64-dump_syms:
     treeherder:
         symbol: TL(dump_syms)
     worker-type: b-linux
     run:
-        toolchain-artifact: public/build/dump_syms.tar.xz
+        toolchain-artifact: public/build/dump_syms.tar.zst
     fetches:
         toolchain:
             - linux64-binutils
             - linux64-clang-11
             - linux64-rust-1.54
             - sysroot-x86_64-linux-gnu
 
 macosx64-dump_syms:
     treeherder:
         symbol: TM(dump_syms)
     worker-type: b-linux
     run:
         arguments: ['x86_64-apple-darwin']
-        toolchain-artifact: public/build/dump_syms.tar.xz
+        toolchain-artifact: public/build/dump_syms.tar.zst
     fetches:
         toolchain:
             - linux64-rust-macos-1.54
             - linux64-clang-11
             - linux64-cctools-port-clang-11
             - linux64-llvm-dsymutil
             - macosx64-sdk-10.12
 
 macosx64-aarch64-dump_syms:
     treeherder:
         symbol: TM(dump_syms-arm64)
     worker-type: b-linux
     run:
         arguments: ['aarch64-apple-darwin']
-        toolchain-artifact: public/build/dump_syms.tar.xz
+        toolchain-artifact: public/build/dump_syms.tar.zst
     fetches:
         toolchain:
             - linux64-rust-macos-1.54
             - linux64-clang-11
             - linux64-cctools-port-clang-11
             - linux64-llvm-dsymutil
             - macosx64-sdk-11.0
 
 win64-dump_syms:
     treeherder:
         symbol: TW64(dump_syms)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
-        toolchain-artifact: public/build/dump_syms.tar.bz2
+        toolchain-artifact: public/build/dump_syms.tar.zst
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
     fetches:
         toolchain:
             - win64-rust-1.54
--- a/taskcluster/ci/toolchain/fix-stacks.yml
+++ b/taskcluster/ci/toolchain/fix-stacks.yml
@@ -17,59 +17,59 @@ job-defaults:
         fetch:
             - fix-stacks
 
 linux64-fix-stacks:
     treeherder:
         symbol: TL(fix-stacks)
     run:
         arguments: ['x86_64-unknown-linux-gnu']
-        toolchain-artifact: public/build/fix-stacks.tar.xz
+        toolchain-artifact: public/build/fix-stacks.tar.zst
     fetches:
         toolchain:
             - linux64-binutils
             - linux64-clang-11
             - linux64-rust-1.47
             - sysroot-x86_64-linux-gnu
 
 macosx64-fix-stacks:
     treeherder:
         symbol: TM(fix-stacks)
     run:
         arguments: ['x86_64-apple-darwin']
-        toolchain-artifact: public/build/fix-stacks.tar.xz
+        toolchain-artifact: public/build/fix-stacks.tar.zst
     fetches:
         toolchain:
             - linux64-cctools-port-clang-11
             - linux64-clang-11
             - linux64-rust-macos-1.47
             - macosx64-sdk-10.12
 
 macosx64-aarch64-fix-stacks:
     treeherder:
         symbol: TM(fix-stacks-arm64)
     run:
         arguments: ['aarch64-apple-darwin']
-        toolchain-artifact: public/build/fix-stacks.tar.xz
+        toolchain-artifact: public/build/fix-stacks.tar.zst
     fetches:
         toolchain:
             - linux64-cctools-port-clang-11
             - linux64-clang-11
             - linux64-rust-macos-1.49
             - macosx64-sdk-11.0
 
 win32-fix-stacks:
     treeherder:
         symbol: TW32(fix-stacks)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
         arguments: ['i686-pc-windows-msvc']
-        toolchain-artifact: public/build/fix-stacks.tar.bz2
+        toolchain-artifact: public/build/fix-stacks.tar.zst
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
     fetches:
         toolchain:
             - linux64-clang-11
             - linux64-liblowercase
             - linux64-rust-windows-1.47
--- a/taskcluster/ci/toolchain/gcc.yml
+++ b/taskcluster/ci/toolchain/gcc.yml
@@ -4,17 +4,17 @@
 ---
 job-defaults:
     worker-type: b-linux
     worker:
         max-run-time: 3600
     run:
         resources:
             - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-artifact: public/build/gcc.tar.xz
+        toolchain-artifact: public/build/gcc.tar.zst
     fetches:
         toolchain:
             - linux64-toolchain-sysroot
 
 linux64-gcc-7:
     description: "GCC 7 toolchain build"
     treeherder:
         symbol: TL(gcc7)
--- a/taskcluster/ci/toolchain/gn.yml
+++ b/taskcluster/ci/toolchain/gn.yml
@@ -7,17 +7,17 @@ job-defaults:
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run-on-projects:
         - trunk
     run:
         resources:
             - 'taskcluster/scripts/misc/build-gn-common.sh'
-        toolchain-artifact: public/build/gn.tar.xz
+        toolchain-artifact: public/build/gn.tar.zst
     fetches:
         fetch:
             - gn
 
 linux64-gn:
     treeherder:
         symbol: TL(gn)
     run:
@@ -44,13 +44,12 @@ win32-gn:
     worker:
         max-run-time: 3600
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
         script: build-gn-win32.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
-        toolchain-artifact: public/build/gn.tar.bz2
         tooltool-downloads: internal
     fetches:
         fetch:
             - ninja
--- a/taskcluster/ci/toolchain/grcov.yml
+++ b/taskcluster/ci/toolchain/grcov.yml
@@ -4,17 +4,17 @@
 ---
 job-defaults:
     description: "grcov toolchain build"
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
         script: build-grcov.sh
-        toolchain-artifact: public/build/grcov.tar.xz
+        toolchain-artifact: public/build/grcov.tar.zst
     fetches:
         fetch:
             - grcov
 
 linux64-grcov:
     treeherder:
         symbol: TL(grcov)
     fetches:
@@ -37,15 +37,14 @@ macosx64-grcov:
 win64-grcov:
     treeherder:
         symbol: TW64(grcov)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
-        toolchain-artifact: public/build/grcov.tar.bz2
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
     fetches:
         toolchain:
             - win64-rust-1.47
--- a/taskcluster/ci/toolchain/mingw.yml
+++ b/taskcluster/ci/toolchain/mingw.yml
@@ -14,17 +14,17 @@ linux64-mingw32-gcc:
     treeherder:
         symbol: TMW(mingw32-gcc)
     worker:
         max-run-time: 10800
     run:
         script: build-gcc-mingw32.sh
         resources:
             - 'build/unix/build-gcc/build-gcc.sh'
-        toolchain-artifact: public/build/mingw32.tar.xz
+        toolchain-artifact: public/build/mingw32.tar.zst
     fetches:
         fetch:
             - binutils-2.27
             - gcc-6.5.0
             - gmp-5.1.3
             - isl-0.15
             - mpc-0.8.2
             - mpfr-3.1.5
@@ -33,31 +33,31 @@ linux64-mingw32-nsis:
     description: "NSIS build for MinGW32 Cross Compile"
     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
+        toolchain-artifact: public/build/nsis.tar.zst
     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
+        toolchain-artifact: public/build/fxc2.tar.zst
     fetches:
         fetch:
             - fxc2
         toolchain:
             - linux64-clang-mingw-x86
--- a/taskcluster/ci/toolchain/minidump_stackwalk.yml
+++ b/taskcluster/ci/toolchain/minidump_stackwalk.yml
@@ -14,17 +14,17 @@ job-defaults:
         sparse-profile: null
         resources:
             - 'build/moz.configure'
             - 'config/external/zlib'
             - 'moz.configure'
             - 'toolkit/crashreporter'
             - 'toolkit/crashreporter/google-breakpad/src/processor'
             - 'tools/crashreporter/'
-        toolchain-artifact: public/build/minidump_stackwalk.tar.xz
+        toolchain-artifact: public/build/minidump_stackwalk.tar.zst
     run-on-projects:
         - trunk
 
 linux64-minidump-stackwalk:
     treeherder:
         symbol: TL(stackwalk)
     fetches:
         toolchain:
@@ -66,16 +66,16 @@ win32-minidump-stackwalk:
         toolchain:
             - linux64-clang-mingw-x86
             - mingw32-rust-1.51
 
 linux64-breakpad-injector:
     description: "breakpad injector toolchain build"
     run:
         script: build-breakpad-injector.sh
-        toolchain-artifact: public/build/injector.tar.xz
+        toolchain-artifact: public/build/injector.tar.zst
     treeherder:
         symbol: TL(injector)
     fetches:
         toolchain:
             - linux64-clang-11
             - linux64-binutils
             - linux64-toolchain-sysroot
--- a/taskcluster/ci/toolchain/misc.yml
+++ b/taskcluster/ci/toolchain/misc.yml
@@ -17,40 +17,40 @@ linux64-infer:
     worker:
         docker-image: {in-tree: static-analysis-build}
         max-run-time: 3600
     run:
         script: build-infer-linux.sh
         resources:
             - 'build/build-infer/build-infer.py'
             - 'build/build-infer/infer-linux64.json'
-        toolchain-artifact: public/build/infer.tar.xz
+        toolchain-artifact: public/build/infer.tar.zst
 
 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
+        toolchain-artifact: public/build/llvm-dsymutil.tar.zst
     fetches:
         fetch:
             - clang-11
         toolchain:
             - linux64-gcc-7
 
 linux64-binutils-2.31.1:
     description: "Binutils toolchain build"
     treeherder:
         symbol: TL(binutil2.31)
     run:
         script: build-binutils-linux.sh
         resources:
             - 'build/unix/build-binutils/build-binutils.sh'
-        toolchain-artifact: public/build/binutils.tar.xz
+        toolchain-artifact: public/build/binutils.tar.zst
     fetches:
         fetch:
             - binutils-2.31.1
         toolchain:
             # Work around https://bugs.debian.org/786883 by using toolchain
             # gcc. We can remove this workaround when we upgrade the toolchain
             # docker image to Debian bullseye.
             - linux64-gcc-7
@@ -59,17 +59,17 @@ linux64-binutils-2.31.1:
 linux64-binutils:
     description: "Binutils toolchain build"
     treeherder:
         symbol: TL(binutil)
     run:
         script: build-binutils-linux.sh
         resources:
             - 'build/unix/build-binutils/build-binutils.sh'
-        toolchain-artifact: public/build/binutils.tar.xz
+        toolchain-artifact: public/build/binutils.tar.zst
     fetches:
         fetch:
             - binutils-2.36.1
         toolchain:
             # Work around https://bugs.debian.org/786883 by using toolchain
             # gcc. We can remove this workaround when we upgrade the toolchain
             # docker image to Debian bullseye.
             - linux64-gcc-7
@@ -78,30 +78,30 @@ 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'
-        toolchain-artifact: public/build/hfsplus-tools.tar.xz
+        toolchain-artifact: public/build/hfsplus-tools.tar.zst
     fetches:
         fetch:
             - hfsplus-tools
         toolchain:
             - linux64-clang-11
 
 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
+        toolchain-artifact: public/build/dmg.tar.zst
     fetches:
         fetch:
             - libdmg-hfsplus
         toolchain:
             - linux64-clang-11
             - linux64-toolchain-sysroot
 
 linux64-mar-tools:
@@ -110,34 +110,34 @@ linux64-mar-tools:
         symbol: TL(mar-tools)
     fetches:
         toolchain:
             - linux64-clang-7
             - linux64-binutils
     run:
         script: build-mar-tools.sh
         sparse-profile: null
-        toolchain-artifact: public/build/mar-tools.tar.xz
+        toolchain-artifact: public/build/mar-tools.tar.zst
         resources:
             - build/moz.configure
             - modules/libmar/
             - moz.configure
             - other-licenses/bsdiff/
             - other-licenses/nsis/Contrib/CityHash/cityhash/
             - toolkit/mozapps/update/updater/bspatch/
             - tools/update-packaging/
 
 linux64-upx:
     description: "UPX build"
     treeherder:
         symbol: TL(upx)
         tier: 1
     run:
         script: build-upx.sh
-        toolchain-artifact: public/build/upx.tar.xz
+        toolchain-artifact: public/build/upx.tar.zst
 
 linux64-msix-packaging:
     description: "msix-packaging build"
     treeherder:
         symbol: TL(msix-packaging)
         tier: 1
     run:
         script: build-msix-packaging.sh
@@ -154,137 +154,137 @@ linux64-custom-v8:
     treeherder:
         symbol: TL(custom-v8)
     worker:
         docker-image: {in-tree: custom-v8}
         max-run-time: 3600
     run:
         script: build-custom-v8.sh
         arguments: [
-            d8.zip,
+            d8.tar.zst,
             is_debug=false,
             target_cpu="x64"
         ]
-        toolchain-artifact: public/build/d8.zip
+        toolchain-artifact: public/build/d8.tar.zst
 
 browsertime:
     description: "npm install browsertime node_modules"
     treeherder:
         symbol: TL(browsertime)
     run:
         script: browsertime.sh
         sparse-profile: null
         resources:
             - 'tools/browsertime/package.json'
             - 'tools/browsertime/package-lock.json'
             - 'tools/browsertime/mach_commands.py'
-        toolchain-artifact: public/build/browsertime.tar.bz2
+        toolchain-artifact: public/build/browsertime.tar.zst
     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
         resources:
             - 'gfx/wr/Cargo.lock'
             - 'gfx/wr/ci-scripts/install-meson.sh'
-        toolchain-artifact: public/build/wrench-deps.tar.bz2
+        toolchain-artifact: public/build/wrench-deps.tar.zst
     fetches:
         fetch:
             - android-rs-glue
         toolchain:
             - linux64-rust-1.47  # whatever m-c is built with
 
 linux64-liblowercase:
     description: "liblowercase"
     treeherder:
         symbol: TL(lc)
     run:
         script: build-liblowercase.sh
         sparse-profile: liblowercase
-        toolchain-artifact: public/build/liblowercase.tar.xz
+        toolchain-artifact: public/build/liblowercase.tar.zst
         resources:
             - build/liblowercase/
     fetches:
         toolchain:
             - linux64-rust-1.47
 
 linux64-wine:
     description: "Wine build for Windows Cross Compile"
     treeherder:
         symbol: TL(wine)
         tier: 1
     worker:
         max-run-time: 10800
     run:
         script: build-wine.sh
-        toolchain-artifact: public/build/wine.tar.xz
+        toolchain-artifact: public/build/wine.tar.zst
     fetches:
         fetch:
             - wine
 
 win32-pdbstr:
     description: "pdbstr for 32-bits Windows"
     treeherder:
         symbol: TW32(pdbstr)
     worker-type: b-win2012
     worker:
         artifacts:
-            - name: project/gecko/pdbstr/pdbstr.tar.bz2
-              path: pdbstr.tar.bz2
+            - name: project/gecko/pdbstr/pdbstr.tar.zst
+              path: pdbstr.tar.zst
               type: file
     run:
         script: exfiltrate-pdbstr.sh
         arguments: ['x86']
-        toolchain-artifact: project/gecko/pdbstr/pdbstr.tar.bz2
+        toolchain-artifact: project/gecko/pdbstr/pdbstr.tar.zst
 
 win64-pdbstr:
     description: "pdbstr for 64-bits Windows"
     treeherder:
         symbol: TW64(pdbstr)
     worker-type: b-win2012
     worker:
         artifacts:
-            - name: project/gecko/pdbstr/pdbstr.tar.bz2
-              path: pdbstr.tar.bz2
+            - name: project/gecko/pdbstr/pdbstr.tar.zst
+              path: pdbstr.tar.zst
               type: file
     run:
         script: exfiltrate-pdbstr.sh
         arguments: ['x64']
-        toolchain-artifact: project/gecko/pdbstr/pdbstr.tar.bz2
+        toolchain-artifact: project/gecko/pdbstr/pdbstr.tar.zst
 
 linux64-winchecksec:
     description: "winchecksec"
     treeherder:
         symbol: TL(winchecksec)
     run:
         script: build-winchecksec.sh
-        toolchain-artifact: public/build/winchecksec.tar.bz2
+        toolchain-artifact: public/build/winchecksec.tar.zst
         tooltool-downloads: internal
     fetches:
         fetch:
             - winchecksec
 
 win64-winchecksec:
     description: "winchecksec"
     treeherder:
         symbol: TW64(winchecksec)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
         script: build-winchecksec.sh
-        toolchain-artifact: public/build/winchecksec.tar.bz2
+        toolchain-artifact: public/build/winchecksec.tar.zst
         tooltool-downloads: internal
     fetches:
         fetch:
             - winchecksec
         toolchain:
             - linux64-clang-win-cross
             - linux64-liblowercase
 
@@ -306,13 +306,13 @@ win64-mozmake:
     treeherder:
         symbol: TW64(mozmake)
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     worker-type: b-win2012
     run:
         script: build-mozmake.sh
-        toolchain-artifact: public/build/mozmake.tar.bz2
+        toolchain-artifact: public/build/mozmake.tar.zst
         tooltool-downloads: internal
     fetches:
         fetch:
             - gnumake
--- a/taskcluster/ci/toolchain/nasm.yml
+++ b/taskcluster/ci/toolchain/nasm.yml
@@ -3,17 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 ---
 job-defaults:
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run-on-projects: [trunk]
     run:
-        toolchain-artifact: public/build/nasm.tar.bz2
+        toolchain-artifact: public/build/nasm.tar.zst
 
 win64-nasm:
     description: "nasm win64 build"
     attributes:
         local-toolchain: true
     treeherder:
         symbol: TW64(nasm)
     run:
--- a/taskcluster/ci/toolchain/resourcemonitor.yml
+++ b/taskcluster/ci/toolchain/resourcemonitor.yml
@@ -8,17 +8,17 @@ job-defaults:
         max-run-time: 1800
     fetches:
         fetch:
             - go-1.14.4
             - resource-monitor
     run:
         script: build-resourcemonitor.sh
         sparse-profile: null
-        toolchain-artifact: public/build/resource-monitor.tar.xz
+        toolchain-artifact: public/build/resource-monitor.tar.zst
 
 linux64-resource-monitor:
     description: "linux64 resourcemonitor toolchain build"
     treeherder:
         symbol: TL(rs-monitor)
     run:
         arguments: ['linux64']
 
--- a/taskcluster/ci/toolchain/rust-size.yml
+++ b/taskcluster/ci/toolchain/rust-size.yml
@@ -12,28 +12,28 @@ job-defaults:
         fetch:
             - rust-size
 
 linux64-rust-size:
     treeherder:
         symbol: TL(rust-size)
     worker-type: b-linux
     run:
-        toolchain-artifact: public/build/rust-size.tar.xz
+        toolchain-artifact: public/build/rust-size.tar.zst
     fetches:
         toolchain:
             - linux64-rust-1.47
 
 win64-rust-size:
     treeherder:
         symbol: TW64(rust-size)
     worker-type: b-win2012
     worker:
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
-        toolchain-artifact: public/build/rust-size.tar.bz2
+        toolchain-artifact: public/build/rust-size.tar.zst
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
     fetches:
         toolchain:
             - win64-rust-1.47
--- a/taskcluster/ci/toolchain/sccache.yml
+++ b/taskcluster/ci/toolchain/sccache.yml
@@ -18,50 +18,50 @@ job-defaults:
 
 linux64-sccache:
     treeherder:
         symbol: TL(sccache)
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
-        toolchain-artifact: public/build/sccache.tar.xz
+        toolchain-artifact: public/build/sccache.tar.zst
     fetches:
         toolchain:
             - linux64-rust-1.47
             - linux64-clang-11
             - linux64-binutils
             - sysroot-x86_64-linux-gnu
 
 macosx64-sccache:
     treeherder:
         symbol: TM(sccache)
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
         arguments: ['x86_64-apple-darwin']
-        toolchain-artifact: public/build/sccache.tar.xz
+        toolchain-artifact: public/build/sccache.tar.zst
     fetches:
         toolchain:
             - linux64-rust-macos-1.47
             - linux64-clang-11
             - linux64-cctools-port-clang-11
             - linux64-llvm-dsymutil
             - macosx64-sdk-10.12
 
 macosx64-aarch64-sccache:
     treeherder:
         symbol: TM(sccache-aarch64)
     worker-type: b-linux
     worker:
         max-run-time: 1800
     run:
         arguments: ['aarch64-apple-darwin']
-        toolchain-artifact: public/build/sccache.tar.xz
+        toolchain-artifact: public/build/sccache.tar.zst
     fetches:
         toolchain:
             - linux64-rust-macos-1.49
             - linux64-clang-11
             - linux64-cctools-port-clang-11
             - linux64-llvm-dsymutil
             - macosx64-sdk-11.0
 
@@ -69,15 +69,15 @@ win64-sccache:
     treeherder:
         symbol: TW64(sccache)
     worker-type: b-win2012
     worker:
         max-run-time: 3600
         env:
             TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/vs2017-15.9.manifest"
     run:
-        toolchain-artifact: public/build/sccache.tar.bz2
+        toolchain-artifact: public/build/sccache.tar.zst
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         tooltool-downloads: internal
     fetches:
         toolchain:
             - win64-rust-1.47
--- a/taskcluster/docker/custom-v8/Dockerfile
+++ b/taskcluster/docker/custom-v8/Dockerfile
@@ -13,9 +13,9 @@ RUN apt-get update && \
       curl \
       libbz2-dev \
       libglib2.0-dev \
       libtinfo5 \
       pkg-config \
       tar \
       unzip \
       wget \
-      zip
+      zstd
--- a/taskcluster/scripts/misc/browsertime.sh
+++ b/taskcluster/scripts/misc/browsertime.sh
@@ -11,9 +11,9 @@ cd $GECKO_PATH
 export PATH=$PATH:$MOZ_FETCHES_DIR/node/bin
 
 ./mach browsertime --setup
 
 # We have tools/browsertime/{package.json,node_modules,...} and want
 # browsertime/{package.json,node_modules}.
 mkdir -p  /builds/worker/artifacts
 cd tools
-tar cjf /builds/worker/artifacts/browsertime.tar.bz2 browsertime
+tar caf /builds/worker/artifacts/browsertime.tar.zst browsertime
--- a/taskcluster/scripts/misc/build-breakpad-injector.sh
+++ b/taskcluster/scripts/misc/build-breakpad-injector.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building libbreakpadinjector.so, currently for linux only
 
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 
 cd $GECKO_PATH
 
 export MOZ_OBJDIR=obj-injector
 
 echo ac_add_options --enable-project=tools/crashreporter/injector > .mozconfig
 
 INJECTOR=libbreakpadinjector.so
--- a/taskcluster/scripts/misc/build-cbindgen.sh
+++ b/taskcluster/scripts/misc/build-cbindgen.sh
@@ -1,21 +1,18 @@
 #!/bin/bash
 set -x -e -v
 
 # Needed by osx-cross-linker.
 export TARGET="$1"
+COMPRESS_EXT=zst
 
 case "$(uname -s)" in
-Linux)
-    COMPRESS_EXT=xz
-    ;;
 MINGW*)
     UPLOAD_DIR=$PWD/public/build
-    COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
 
     export CC=clang-cl
     ;;
 esac
 
 cd $GECKO_PATH
@@ -44,13 +41,13 @@ esac
 export PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
 
 cd $MOZ_FETCHES_DIR/cbindgen
 
 cargo build --verbose --release --target "$TARGET"
 
 mkdir cbindgen
 cp target/$TARGET/release/cbindgen* cbindgen/
-tar -acf cbindgen.tar.$COMPRESS_EXT cbindgen
+tar -c cbindgen | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > cbindgen.tar.$COMPRESS_EXT
 mkdir -p $UPLOAD_DIR
 cp cbindgen.tar.$COMPRESS_EXT $UPLOAD_DIR
 
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-cctools-port.sh
+++ b/taskcluster/scripts/misc/build-cctools-port.sh
@@ -89,9 +89,9 @@ cp $CLANG_DIR/bin/dsymutil $CROSSTOOLS_B
 cp $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-lipo $CROSSTOOLS_BUILD_DIR/bin/lipo
 
 (cd $CROSSTOOLS_BUILD_DIR/bin/; for i in x86_64-apple-darwin-*; do
     ln $i aarch64${i#x86_64}
 done)
 
 # Put a tarball in the artifacts dir
 mkdir -p $UPLOAD_DIR
-tar cJf $UPLOAD_DIR/cctools.tar.xz -C $CROSSTOOLS_BUILD_DIR/.. `basename $CROSSTOOLS_BUILD_DIR`
+tar caf $UPLOAD_DIR/cctools.tar.zst -C $CROSSTOOLS_BUILD_DIR/.. `basename $CROSSTOOLS_BUILD_DIR`
--- a/taskcluster/scripts/misc/build-custom-v8.sh
+++ b/taskcluster/scripts/misc/build-custom-v8.sh
@@ -1,13 +1,13 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building a custom version of V8
-ARTIFACT_NAME='d8.zip'
+ARTIFACT_NAME='d8.tar.zst'
 CONFIG='is_debug=false target_cpu="x64"'
 if [[ $# -eq 0 ]]; then
     echo "Using default configuration for v8 build."
     CONFIG=$(echo $CONFIG | tr -d "'")
 else
 	# First argument must be the artifact name
 	ARTIFACT_NAME="$1"
 	shift
@@ -36,12 +36,12 @@ ninja -C out/release d8
 # Gather binary and related files into a zip, and upload it
 cd ..
 mkdir d8
 
 cp -R v8/out/release d8
 cp -R v8/include d8
 chmod -R +x d8
 
-zip -r $ARTIFACT_NAME d8
+tar caf $ARTIFACT_NAME d8
 
 mkdir -p $UPLOAD_DIR
 cp $ARTIFACT_NAME $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-dump-syms.sh
+++ b/taskcluster/scripts/misc/build-dump-syms.sh
@@ -1,23 +1,20 @@
 #!/bin/bash
 set -x -e -v
 
 PROJECT=dump_syms
 # Needed by osx-cross-linker.
 export TARGET=$1
 
+COMPRESS_EXT=zst
 # This script is for building dump_syms
 case "$(uname -s)" in
-Linux)
-    COMPRESS_EXT=xz
-    ;;
 MINGW*)
     UPLOAD_DIR=$PWD/public/build
-    COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
@@ -60,14 +57,14 @@ MINGW*)
 esac
 
 mkdir $PROJECT
 PROJECT_OUT=target/release/${PROJECT}*
 if [ -n "$TARGET" ]; then
     PROJECT_OUT=target/${TARGET}/release/${PROJECT}*
 fi
 cp ${PROJECT_OUT} ${PROJECT}/
-tar -acf ${PROJECT}.tar.$COMPRESS_EXT $PROJECT
+tar -c $PROJECT | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > ${PROJECT}.tar.$COMPRESS_EXT
 mkdir -p $UPLOAD_DIR
 cp ${PROJECT}.tar.$COMPRESS_EXT $UPLOAD_DIR
 
 cd ..
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-fix-stacks.sh
+++ b/taskcluster/scripts/misc/build-fix-stacks.sh
@@ -1,48 +1,46 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building fix-stacks.
 PROJECT=fix-stacks
 
 export TARGET="$1"
 
+COMPRESS_EXT=zst
 case "$TARGET" in
 x86_64-unknown-linux-gnu)
     EXE=
-    COMPRESS_EXT=xz
     # {CC,CXX} and TARGET_{CC,CXX} must be set because a build.rs file builds
     # some C and C++ code.
     export CC=$MOZ_FETCHES_DIR/clang/bin/clang
     export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++
     export PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
     export CFLAGS_x86_64_unknown_linux_gnu="--sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
     export RUSTFLAGS="-C linker=$CXX -C link-arg=--sysroot=$MOZ_FETCHES_DIR/sysroot-x86_64-linux-gnu"
     ;;
 *-apple-darwin)
     # Cross-compiling for Mac on Linux.
     EXE=
-    COMPRESS_EXT=xz
     # {CC,CXX} and TARGET_{CC,CXX} must be set because a build.rs file builds
     # some C and C++ code.
     export CC=$MOZ_FETCHES_DIR/clang/bin/clang
     export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++
     export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH"
     export RUSTFLAGS="-C linker=$GECKO_PATH/taskcluster/scripts/misc/osx-cross-linker"
     if test "$TARGET" = "aarch64-apple-darwin"; then
         export SDK_VER=11.0
     fi
     export TARGET_CC="$CC -isysroot $MOZ_FETCHES_DIR/MacOSX${SDK_VER:-10.12}.sdk"
     export TARGET_CXX="$CXX -isysroot $MOZ_FETCHES_DIR/MacOSX${SDK_VER:-10.12}.sdk"
     ;;
 i686-pc-windows-msvc)
     # Cross-compiling for Windows on Linux.
     EXE=.exe
-    COMPRESS_EXT=bz2
     # Some magic that papers over differences in case-sensitivity/insensitivity on Linux
     # and Windows file systems.
     export LD_PRELOAD="/builds/worker/fetches/liblowercase/liblowercase.so"
     export LOWERCASE_DIRS="/builds/worker/fetches/vs2017_15.9.6"
     # {CC,CXX} and TARGET_{CC,CXX} must be set because a build.rs file builds
     # some C and C++ code.
     export CC=$MOZ_FETCHES_DIR/clang/bin/clang-cl
     export CXX=$MOZ_FETCHES_DIR/clang/bin/clang-cl
--- a/taskcluster/scripts/misc/build-gn-common.sh
+++ b/taskcluster/scripts/misc/build-gn-common.sh
@@ -54,10 +54,10 @@ mkdir -p $UPLOAD_DIR $STAGE
 
 # At this point, the resulting binary is at:
 # $WORKSPACE/out/Release/gn
 if test "$MAC_CROSS" = "" -a "$(uname)" = "Linux"; then
     strip out/gn
 fi
 cp out/gn $STAGE
 
-tar -acf gn.tar.$COMPRESS_EXT $STAGE
+tar -c $STAGE | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > gn.tar.$COMPRESS_EXT
 cp gn.tar.$COMPRESS_EXT $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-gn-linux.sh
+++ b/taskcluster/scripts/misc/build-gn-linux.sh
@@ -1,15 +1,15 @@
 #!/bin/bash
 set -e -v
 
 # This script is for building GN on Linux.
 
 WORKSPACE=$HOME/workspace
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 export CC=$MOZ_FETCHES_DIR/gcc/bin/gcc
 export CXX=$MOZ_FETCHES_DIR/gcc/bin/g++
 export LDFLAGS=-lrt
 
 # Gn build scripts use #!/usr/bin/env python, which will be python 2.6 on
 # the worker and cause failures. Work around this by putting python2.7
 # ahead of it in PATH.
 mkdir -p $WORKSPACE/python_bin
--- a/taskcluster/scripts/misc/build-gn-macosx.sh
+++ b/taskcluster/scripts/misc/build-gn-macosx.sh
@@ -1,15 +1,15 @@
 #!/bin/bash
 set -e -v
 
 # This script is for building GN.
 
 WORKSPACE=$HOME/workspace
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 
 CROSS_CCTOOLS_PATH=$MOZ_FETCHES_DIR/cctools
 CROSS_SYSROOT=$MOZ_FETCHES_DIR/MacOSX10.12.sdk
 
 export CC=$MOZ_FETCHES_DIR/clang/bin/clang
 export CXX=$MOZ_FETCHES_DIR/clang/bin/clang++
 export AR=$MOZ_FETCHES_DIR/clang/bin/llvm-ar
 export CFLAGS="-target x86_64-apple-darwin -mlinker-version=137 -B ${CROSS_CCTOOLS_PATH}/bin -isysroot ${CROSS_SYSROOT} -I${CROSS_SYSROOT}/usr/include -iframework ${CROSS_SYSROOT}/System/Library/Frameworks"
--- a/taskcluster/scripts/misc/build-grcov.sh
+++ b/taskcluster/scripts/misc/build-grcov.sh
@@ -1,29 +1,27 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building grcov
 
 PROJECT=grcov
+COMPRESS_EXT=zst
 
 case "$(uname -s)" in
 Linux)
-    COMPRESS_EXT=xz
-
     export CC=clang
     export CXX=clang++
     export RUSTFLAGS=-Clinker=clang++
     export CXXFLAGS=-D_GLIBCXX_USE_CXX11_ABI=0
 
     export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/binutils/bin:$PATH"
     ;;
 MINGW*)
     UPLOAD_DIR=$PWD/public/build
-    COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
@@ -34,16 +32,16 @@ PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rust
 
 pushd $MOZ_FETCHES_DIR/$PROJECT
 
 cargo build --verbose --release
 
 mkdir $PROJECT
 cp target/release/${PROJECT}* ${PROJECT}/
 pushd $PROJECT
-tar -acf ../${PROJECT}.tar.$COMPRESS_EXT *
+tar -c * | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > ../${PROJECT}.tar.$COMPRESS_EXT
 popd
 mkdir -p $UPLOAD_DIR
 cp ${PROJECT}.tar.$COMPRESS_EXT $UPLOAD_DIR
 
 popd
 
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-libdmg-hfsplus.sh
+++ b/taskcluster/scripts/misc/build-libdmg-hfsplus.sh
@@ -26,9 +26,9 @@ cp dmg/dmg hfs/hfsplus $STAGE
 
 # duplicate the functionality of taskcluster-lib-urls, but in bash..
 queue_base="$TASKCLUSTER_ROOT_URL/api/queue/v1"
 
 cat >$STAGE/README<<EOF
 Source is available as a taskcluster artifact:
 $queue_base/task/$(python -c 'import json, os; print "{task}/artifacts/{artifact}".format(**next(f for f in json.loads(os.environ["MOZ_FETCHES"]) if "libdmg-hfsplus" in f["artifact"]))')
 EOF
-tar cf - -C $WORKSPACE `basename $STAGE` | xz > $UPLOAD_DIR/dmg.tar.xz
+tar caf $UPLOAD_DIR/dmg.tar.zst -C $WORKSPACE `basename $STAGE`
--- a/taskcluster/scripts/misc/build-liblowercase.sh
+++ b/taskcluster/scripts/misc/build-liblowercase.sh
@@ -9,11 +9,11 @@ PATH="$MOZ_FETCHES_DIR/rustc/bin:$PATH"
 
 cd $GECKO_PATH/build/liblowercase
 
 cargo build --verbose --release --target-dir $WORKSPACE/obj
 
 mkdir $WORKSPACE/liblowercase
 cp $WORKSPACE/obj/release/liblowercase.so $WORKSPACE/liblowercase
 strip $WORKSPACE/liblowercase/liblowercase.so
-tar -C $WORKSPACE -acf $WORKSPACE/liblowercase.tar.xz liblowercase
+tar -C $WORKSPACE -acf $WORKSPACE/liblowercase.tar.zst liblowercase
 mkdir -p $UPLOAD_DIR
-cp $WORKSPACE/liblowercase.tar.xz $UPLOAD_DIR
+cp $WORKSPACE/liblowercase.tar.zst $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-llvm-dsymutil.sh
+++ b/taskcluster/scripts/misc/build-llvm-dsymutil.sh
@@ -14,12 +14,12 @@ cmake \
   -GNinja \
   -DCMAKE_BUILD_TYPE=Release \
   -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
   -DCMAKE_C_COMPILER=$MOZ_FETCHES_DIR/gcc/bin/gcc \
   ..
 
 ninja dsymutil llvm-symbolizer
 
-tar --xform='s,^,llvm-dsymutil/,' -Jcf llvm-dsymutil.tar.xz bin/dsymutil bin/llvm-symbolizer
+tar --xform='s,^,llvm-dsymutil/,' -caf llvm-dsymutil.tar.zst bin/dsymutil bin/llvm-symbolizer
 
 mkdir -p $UPLOAD_DIR
-cp llvm-dsymutil.tar.xz $UPLOAD_DIR
+cp llvm-dsymutil.tar.zst $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-mar-tools.sh
+++ b/taskcluster/scripts/misc/build-mar-tools.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building mar and mbsdiff
 
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 
 cd $GECKO_PATH
 
 export MOZ_OBJDIR=obj-mar
 
 echo ac_add_options --enable-project=tools/update-packaging > .mozconfig
 
 TOOLCHAINS="binutils clang"
--- a/taskcluster/scripts/misc/build-mingw-fxc2-x86.sh
+++ b/taskcluster/scripts/misc/build-mingw-fxc2-x86.sh
@@ -14,12 +14,12 @@ cd $MOZ_FETCHES_DIR/fxc2
 make -j$(nproc) x86
 
 cp fxc2.exe $INSTALL_DIR/bin/
 cp dll/d3dcompiler_47_32.dll $INSTALL_DIR/bin/d3dcompiler_47.dll
 
 # --------------
 
 cd $WORKSPACE
-tar caf fxc2.tar.xz fxc2
+tar caf fxc2.tar.zst fxc2
 
 mkdir -p $UPLOAD_DIR
 cp fxc2.tar.* $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-mingw32-nsis.sh
+++ b/taskcluster/scripts/misc/build-mingw32-nsis.sh
@@ -36,12 +36,12 @@ patch -p1 < $GECKO_PATH/build/win32/nsis
 # I don't know how to make the version work with the environment variables/config flags the way the author appears to
 sed -i "s/'VERSION', 'Version of NSIS', cvs_version/'VERSION', 'Version of NSIS', '3.01'/" SConstruct
 scons XGCC_W32_PREFIX=i686-w64-mingw32- ZLIB_W32=../zlib-1.2.11 SKIPUTILS="NSIS Menu" PREFIX=$INSTALL_DIR/ install
 
 # --------------
 
 cd $MOZ_FETCHES_DIR
 
-tar caf nsis.tar.xz mingw32
+tar caf nsis.tar.zst mingw32
 
 mkdir -p $UPLOAD_DIR
 cp nsis.tar.* $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-minidump-stackwalk.sh
+++ b/taskcluster/scripts/misc/build-minidump-stackwalk.sh
@@ -1,14 +1,14 @@
 #!/bin/bash
 set -x -e -v
 
 # This script is for building minidump_stackwalk
 
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 
 cd $GECKO_PATH
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
   . taskcluster/scripts/misc/tooltool-download.sh
 fi
 
 export MOZ_OBJDIR=obj-minidump
--- a/taskcluster/scripts/misc/build-mozmake.sh
+++ b/taskcluster/scripts/misc/build-mozmake.sh
@@ -51,13 +51,13 @@ EOF
 
 chmod +w src/config.h.W32
 sed -i "/#define BATCH_MODE_ONLY_SHELL/s/\/\*\(.*\)\*\//\1/" src/config.h.W32
 cmd /c build_w32.bat
 
 mkdir mozmake
 cp WinRel/gnumake.exe mozmake/mozmake.exe
 
-tar -acf mozmake.tar.bz2 mozmake
+tar -c mozmake | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > mozmake.tar.zst
 mkdir -p $UPLOAD_DIR
-cp mozmake.tar.bz2 $UPLOAD_DIR
+cp mozmake.tar.zst $UPLOAD_DIR
 
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-nasm.sh
+++ b/taskcluster/scripts/misc/build-nasm.sh
@@ -1,12 +1,12 @@
 #!/bin/bash
 set -x -e -v
 
-COMPRESS_EXT=bz2
+COMPRESS_EXT=zst
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
   . $GECKO_PATH/taskcluster/scripts/misc/tooltool-download.sh
 fi
 
 cd $MOZ_FETCHES_DIR/nasm-*
 
 case $(cat version) in
--- a/taskcluster/scripts/misc/build-resourcemonitor.sh
+++ b/taskcluster/scripts/misc/build-resourcemonitor.sh
@@ -1,13 +1,13 @@
 #!/bin/bash
 set -x -e -v
 
 cd "$MOZ_FETCHES_DIR"/resource-monitor/ || exit 1
-COMPRESS_EXT=xz
+COMPRESS_EXT=zst
 
 PATH="$MOZ_FETCHES_DIR/go/bin:$PATH"
 export PATH
 
 EXE_SUFFIX=""
 
 case "$1" in
     linux64)   GOOS=linux; GOARCH=amd64 ;;
--- a/taskcluster/scripts/misc/build-rust-size.sh
+++ b/taskcluster/scripts/misc/build-rust-size.sh
@@ -1,21 +1,20 @@
 #!/bin/bash
 set -x -e -v
 
 PROJECT=rust-size
+COMPRESS_EXT=zst
 
 # This script is for building rust-size
 case "$(uname -s)" in
 Linux)
-    COMPRESS_EXT=xz
     ;;
 MINGW*)
     UPLOAD_DIR=$PWD/public/build
-    COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
@@ -25,15 +24,15 @@ fi
 PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
 
 cd $MOZ_FETCHES_DIR/$PROJECT
 
 cargo build --verbose --release
 
 mkdir $PROJECT
 cp target/release/${PROJECT}* ${PROJECT}/
-tar -acf ${PROJECT}.tar.$COMPRESS_EXT $PROJECT
+tar -c $PROJECT | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > ${PROJECT}.tar.$COMPRESS_EXT
 mkdir -p $UPLOAD_DIR
 cp ${PROJECT}.tar.$COMPRESS_EXT $UPLOAD_DIR
 
 cd ..
 
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-sccache.sh
+++ b/taskcluster/scripts/misc/build-sccache.sh
@@ -1,24 +1,23 @@
 #!/bin/bash
 set -x -e -v
 
 # Needed by osx-cross-linker.
 export TARGET="$1"
 
 # This script is for building sccache
 
+COMPRESS_EXT=zst
 case "$(uname -s)" in
 Linux)
-    COMPRESS_EXT=xz
     PATH="$MOZ_FETCHES_DIR/binutils/bin:$PATH"
     ;;
 MINGW*)
     UPLOAD_DIR=$PWD/public/build
-    COMPRESS_EXT=bz2
 
     . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
     ;;
 esac
 
 cd $GECKO_PATH
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
@@ -60,13 +59,13 @@ esac
 
 SCCACHE_OUT=target/release/sccache*
 if [ -n "$TARGET" ]; then
     SCCACHE_OUT=target/$TARGET/release/sccache*
 fi
 
 mkdir sccache
 cp $SCCACHE_OUT sccache/
-tar -acf sccache.tar.$COMPRESS_EXT sccache
+tar -c sccache | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > sccache.tar.$COMPRESS_EXT
 mkdir -p $UPLOAD_DIR
 cp sccache.tar.$COMPRESS_EXT $UPLOAD_DIR
 
 . $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh
--- a/taskcluster/scripts/misc/build-upx.sh
+++ b/taskcluster/scripts/misc/build-upx.sh
@@ -15,12 +15,12 @@ git checkout 7a3637ff5a800b8bcbad20ae7f6
 git submodule update --init --recursive
 cd src
 make -j$(nproc)
 cp upx.out $INSTALL_DIR/bin/upx
 
 # --------------
 
 cd $WORKSPACE
-tar caf upx.tar.xz upx
+tar caf upx.tar.zst upx
 
 mkdir -p $UPLOAD_DIR
 cp upx.tar.* $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-winchecksec.sh
+++ b/taskcluster/scripts/misc/build-winchecksec.sh
@@ -44,10 +44,10 @@ eval cmake \
   -GNinja \
   -DCMAKE_BUILD_TYPE=Release \
   -DBUILD_SHARED_LIBS=Off \
   $CMAKE_FLAGS
 
 ninja -v
 
 cd ..
-tar -caf winchecksec.tar.bz2 winchecksec/winchecksec${TOOLTOOL_MANIFEST:+.exe}
-cp winchecksec.tar.bz2 $UPLOAD_DIR/
+tar -caf winchecksec.tar.zst winchecksec/winchecksec${TOOLTOOL_MANIFEST:+.exe}
+cp winchecksec.tar.zst $UPLOAD_DIR/
--- a/taskcluster/scripts/misc/build-wine.sh
+++ b/taskcluster/scripts/misc/build-wine.sh
@@ -18,12 +18,12 @@ make -j$(nproc)
 make install
 
 cd $WORKSPACE/build/wine64
 make install
 
 # --------------
 
 cd $WORKSPACE/
-tar caf wine.tar.xz wine
+tar caf wine.tar.zst wine
 
 mkdir -p $UPLOAD_DIR
 cp wine.tar.* $UPLOAD_DIR
--- a/taskcluster/scripts/misc/exfiltrate-pdbstr.sh
+++ b/taskcluster/scripts/misc/exfiltrate-pdbstr.sh
@@ -1,9 +1,9 @@
 #!/bin/sh
 
 set -x -e -v
 
 # Copy the file that already exists on Windows workers.
 mkdir pdbstr
 cp "c:/Program Files (x86)/Windows Kits/10/Debuggers/$1/srcsrv/pdbstr.exe" pdbstr
 
-tar -jcvf pdbstr.tar.bz2 pdbstr
+tar -c pdbstr | python3 $GECKO_PATH/taskcluster/scripts/misc/zstdpy > pdbstr.tar.zst
--- a/taskcluster/scripts/misc/wrench-deps-vendoring.sh
+++ b/taskcluster/scripts/misc/wrench-deps-vendoring.sh
@@ -20,9 +20,9 @@ mkdir wrench-deps/cargo-apk
 # https://github.com/rust-windowing/android-rs-glue/pull/223, we need to use
 # an unpublished version.
 cargo install --path $MOZ_FETCHES_DIR/android-rs-glue/cargo-apk --root wrench-deps/cargo-apk cargo-apk
 
 ci-scripts/install-meson.sh
 mv meson wrench-deps/meson
 
 mkdir -p $UPLOAD_DIR
-tar caf $UPLOAD_DIR/wrench-deps.tar.bz2 wrench-deps
+tar caf $UPLOAD_DIR/wrench-deps.tar.zst wrench-deps