Repository navigation
build: fix mksnapshot path in mksnapshot_args for flattened macOS zips - #53363
Merged
Merged
Conversation
Since the macOS release snapshot tools moved into a secondary toolchain (#52884), gn desc emits the mksnapshot executable path as ./clang_<arch>_snapshot/mksnapshot, but electron_mksnapshot_zip flattens mksnapshot.zip so the binary lives at the zip root. The Fixup Mksnapshot step never rewrote that first argument, so every darwin mksnapshot.zip published since then ships an mksnapshot_args pointing at a path that does not exist in the zip and @electron/mksnapshot fails with ENOENT. Rewrite the leading ./clang_*_snapshot/ prefix to ./ so the args file matches the flattened layout. Linux is unaffected: its cross-arch toolchain dir (clang_x64_v8_arm64) does not match the pattern and its zips are not flattened.
MarshallOfSound
approved these changes
Sep 1, 2026
MarshallOfSound
marked this pull request as ready for review
September 1, 2026 07:14
dsanders11
approved these changes
Sep 1, 2026
jkleinsc
approved these changes
Sep 1, 2026
|
No Release Notes |
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #53370 |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #53371 |
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #53372 |
Member
|
/trop run backport-to 45-x-y |
Contributor
|
The backport process for this PR has been manually initiated - sending your PR to |
Contributor
|
I have automatically backported this PR to "45-x-y", please check out #53388 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested via Slack thread
Requested by David Sanders · Slack thread
Description of Change
Follow-up to #52884.
Before: Since #52884 moved the macOS release snapshot tools into secondary GN toolchains (
//electron/build/toolchain/mac:clang_{arm64,x64}_snapshot), themksnapshot_argsfile inside every published darwinmksnapshot.zipstarts with./clang_arm64_snapshot/mksnapshot(or./clang_x64_snapshot/mksnapshot) — that is the first element ofgn desc out/Default v8:run_mksnapshot_default args, and the "Fixup Mksnapshot" step never rewrote it. Butelectron_mksnapshot_zipflattens the zip on macOS, so the binary actually lives at the zip root and that path does not exist.@electron/mksnapshotspawns the path frommksnapshot_args, so it dies immediately with ENOENT — every darwinmksnapshot.zippublished since Aug 24 (v41.10.7, v42.10.1, v43.5.0, v44.0.0, v44.1.0) is broken this way, and electron/mksnapshot's release + scheduled CI has been red since then.After: The "Fixup Mksnapshot" step strips the leading
./clang_*_snapshot/toolchain prefix from the mksnapshot path (asedalongside the step's existingsededits), somksnapshot_argsnames./mksnapshot, matching the flattened zip layout. Linux is unaffected: its cross-arch toolchain dir (clang_x64_v8_arm64) does not match the pattern, and its zips are not flattened. Default-toolchain builds already emit./mksnapshotand are untouched.Needs backports to
41-x-ythrough44-x-y, which all received the #52884 backports.Checklist
Release Notes
Notes: none
Generated by Claude Code