commit 63ed6d5001442ce2c8424e65894b9c56b831ed86
parent 33610f84b07dbca3d304f7518b94303bdda067f1
Author: Yannis Juglaret <yjuglaret@mozilla.com>
Date: Mon, 13 Oct 2025 09:32:39 +0000
Bug 1976038 - Update linux64-zucchini-bin jobs to build from our own source tree. r=hneiva
We stop relying on the chromium build system and tools, and instead
build the standalone zucchini binary directly from our own source tree.
This uses the tools/zucchini build project, to avoid having to build all
Firefox.
Differential Revision: https://phabricator.services.mozilla.com/D266393
Diffstat:
3 files changed, 24 insertions(+), 75 deletions(-)
diff --git a/taskcluster/kinds/fetch/toolchains.yml b/taskcluster/kinds/fetch/toolchains.yml
@@ -801,15 +801,6 @@ xmlstarlet-1.6.1:
size: 267112
artifact-name: xmlstarlet.deb
-chromium-depot-tools:
- description: Chromium depot tools for managing Chromium repository
- fetch:
- type: git
- repo: https://chromium.googlesource.com/chromium/tools/depot_tools.git
- revision: 5304f2bbb31bad413e029a660097d1da1552e6f4
- artifact-name: chromium-depot-tools.tar.zst
- include-dot-git: true
-
uv:
description: uv 0.7.2 source code
fetch:
diff --git a/taskcluster/kinds/toolchain/misc.yml b/taskcluster/kinds/toolchain/misc.yml
@@ -152,16 +152,17 @@ linux64-zucchini-bin:
fetches:
toolchain:
- linux64-clang-toolchain
- fetch:
- - chromium-depot-tools
- worker:
- env:
- # Note: this revision is for the "chromium/src" trunk
- # https://chromium.googlesource.com/chromium/src/+/refs/heads/main
- CHROMIUM_REVISION: 59c5ba8f94f8b0d4de6da2769d2eedddd08da956
run:
script: build-zucchini.sh
+ sparse-profile: null
toolchain-artifact: public/build/zucchini.tar.xz
+ resources:
+ - build/moz.configure/
+ - moz.configure
+ - third_party/abseil-cpp/
+ - third_party/googletest/
+ - third_party/zucchini/
+ - tools/zucchini/
linux64-upx:
description: "UPX build"
diff --git a/taskcluster/scripts/misc/build-zucchini.sh b/taskcluster/scripts/misc/build-zucchini.sh
@@ -3,79 +3,36 @@
# 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/.
-set -euxo pipefail
+set -x -e -v
+
+# This script builds the standalone zucchini binary used for generating
+# zucchini patches for partial updates.
# Variables
WORKSPACE="$HOME/workspace"
-DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$HOME/fetches/depot_tools.git}"
-CHROMIUM_DIR="$WORKSPACE/chromium"
-BUILD_OUTPUT_DIR="$CHROMIUM_DIR/src/out/Default"
UPLOAD_DIR="${UPLOAD_DIR:-$WORKSPACE/upload}"
-# Target chromium revision
-CHROMIUM_REVISION="${CHROMIUM_REVISION:-main}"
-
# Note that tar will choose type of compression based on provided filename (ie: xz/zst/gz)
TOOLCHAIN_ARTIFACT_PATH="${TOOLCHAIN_ARTIFACT:-public/build/zucchini.tar.xz}"
ARTIFACT_FILENAME=$(basename "$TOOLCHAIN_ARTIFACT_PATH")
-# Disable depot_tools auto-update
-export DEPOT_TOOLS_UPDATE=0
-
-export PATH="$PATH:$DEPOT_TOOLS_DIR"
-
-# Log the current revision of depot_tools for easier tracking
-DEPOT_TOOLS_REV=$(git -C "$DEPOT_TOOLS_DIR" rev-parse HEAD)
-echo "Current depot_tools revision: $DEPOT_TOOLS_REV"
-
-# Set XDG_CONFIG_HOME to avoid write permission issues
-# By default the user in the worker can't write to ~/.config
-# Forces depot_tools to write config to a different folder
-# https://chromium.googlesource.com/chromium/tools/depot_tools/+/refs/heads/main/utils.py#39
-export XDG_CONFIG_HOME="$WORKSPACE/.config"
+cd $GECKO_PATH
-mkdir -p "$CHROMIUM_DIR/src"
-
-# The steps below simulate `fetch --nohooks --no-history chromium` but on a pinned revision
-
-# Setup gclient
-cd "$CHROMIUM_DIR"
-gclient config --spec 'solutions = [
- {
- "name": "src",
- "url": "https://chromium.googlesource.com/chromium/src.git",
- "managed": False,
- "custom_deps": {},
- "custom_vars": {},
- },
-]'
-
-# Fetch Chromium source
-cd "$CHROMIUM_DIR/src"
-git init
-git remote add origin https://chromium.googlesource.com/chromium/src
-git fetch --depth 1 origin $CHROMIUM_REVISION
-git checkout FETCH_HEAD
-git config diff.ignoreSubmodules dirty
+export MOZ_OBJDIR=obj-zucchini
+BUILD_OUTPUT_DIR=$MOZ_OBJDIR/dist/bin
+cat > .mozconfig <<'EOF'
+ac_add_options --enable-project=tools/zucchini
+ac_add_options --enable-zucchini
+EOF
-# Run chromium hooks
-gclient sync --nohooks --no-history
-gclient runhooks
+TOOLCHAINS="clang"
-# Create build output directory and set GN args
-mkdir -p "$BUILD_OUTPUT_DIR"
-cat > "$BUILD_OUTPUT_DIR/args.gn" <<EOF
-enable_nacl = false
-symbol_level = 0
-target_cpu = "x64"
-enable_remoting = false
-is_debug = false
-EOF
+for t in $TOOLCHAINS; do
+ PATH="$MOZ_FETCHES_DIR/$t/bin:$PATH"
+done
-# Generate Ninja build files and build Zucchini
-gn gen "$BUILD_OUTPUT_DIR"
-autoninja -C "$BUILD_OUTPUT_DIR" zucchini
+./mach build -v
# Package the Zucchini binary
cd "$BUILD_OUTPUT_DIR"