Repository navigation
source-sdk: seed bootstrap tools by symlink (unix) or with their trees (Windows), from the runner's tool, never the asset's own - #1265
Merged
Conversation
added 2 commits
September 21, 2026 18:57
… from the runner's tool, never the asset's own #1262 merged before its symlink push landed: main still copies the host binary, and a copied cmake cannot find CMAKE_ROOT (every linux/aarch64 lane on dd803c7). On Windows `command -v cmake` found the asset's own cmake.exe first on PATH and reported it without .exe, so the copy stat'd a name that does not exist (windows x86_64 on 605ecea). The seed now takes the first PATH candidate outside the bootstrap prefix, spelled with .exe on Windows; unix seeds are symlinks to the real path (a tool locates its share/ and lib/clang relative to its executable); Windows copies those trees alongside.
…and packages only that The SDK contains only binaries we built, built by a toolchain we built. A generation-zero run compiles stage 1 with the runner's compiler, so stage 1 is a bootstrap and not a product: the action now builds again with stage 1's own clang/cmake/ninja (SDK_BOOTSTRAP_PREFIX = the stage-1 install, moved aside) and packages that. Runs whose fetched asset can bootstrap are unchanged.
added 4 commits
September 21, 2026 19:18
…rate bootstrap prefix The seed step put the runner's tools inside the fetched SDK directory, the prefix the compiler links against. It now inspects the asset read-only; when the asset bootstraps itself it is used as is, otherwise a separate .deps/bootstrap-<host> holds links to the runner's tools and is exported as SDK_BOOTSTRAP_PREFIX for the build step, which rebuilds with stage 1's own tools whenever the bootstrap is not the asset.
…hat cannot run fails by name windows x86_64 on fd46738: the seeded ninja was Chocolatey's shim (C:/ProgramData/Chocolatey/bin/ninja.exe), which runs only beside its .shim sidecar; copied alone it failed 'ninja --version' and ninja's configure died at project(). The seed now follows the .shim's path to the real executable, and every seeded tool must answer --version before the build.
… Studio's), never a bin/ shim The seed self-check caught it on c206261: 'seeded ninja does not run' — the PATH candidate was still Chocolatey's shim. Known real locations are tried first and Chocolatey's bin/ is skipped outright.
Both Windows lanes on e5c2cb7 failed linking cmake's cmcldeps.exe with 'duplicate resource: type MANIFEST': the GNU-style clang driver made CMake generate its own manifest .res beside cmake's manifest .rc. tools/build-cmake.ps1 — the recipe behind the shipped cmake.exe — builds with clang-cl, links with lld-link and passes CMAKE_MT; sdk-cmake now does the same (SDK_WINDOWS_MT reaches it as a sixth argument) and requires clang-cl and lld-link in the bootstrap prefix, which the generation-zero seed now provides on Windows.
Contributor
Author
|
Battery on this tree (seed-driven, worktree, e500abf): build rc=0, :fixpoint rc=0, :test rc=0, :test-green rc=0, :last-green rc=0 — fully green (the spec sentence is on main). CI's source-sdk lanes on e500abf are the test of the Windows cmake recipe (clang-cl + lld-link + mt.exe) and of the two-stage generation-zero build; seeding self-check and ninja/cmake bootstrap already pass on every lane. |
Contributor
Author
|
Battery on ce0a6a7 (Windows rc.exe fix; seed-driven, worktree): build rc=0, :fixpoint rc=0, :test rc=0, :test-green rc=0, :last-green rc=0. CI lanes on ce0a6a7 are the remaining proof (Windows: clang-cl + lld-link + mt.exe + rc.exe from the same kit; all: stage 1 host-compiled → stage 2 self-compiled → package stage 2). |
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.
Follow-up to #1262 (which merged before its symlink fix was pushed). Two CI failures on main after it:
CMake Error: Could not find CMAKE_ROOT— a copied cmake cannot find itsshare/cmake-X.Y(it locates it relative to its executable); same for clang'slib/clang. Unix seeds are now symlinks to the real path (verified locally: symlinked cmake reports its root, a copy fails).cp: cannot stat '…/bin/cmake'—command -v cmakefound the asset's owncmake.exefirst on PATH (exactly what cannot bootstrap) and reported it without.exe. The seed now takes the first PATH candidate outside the bootstrap prefix, spelled with.exe, and copiesshare/cmake-*/lib/clangalongside since Windows cmake does not resolve links.Workflow-only; the CI lanes on this PR are the test (
source-sdkshould get pastsdk-ninjaon all four non-mac lanes and produce a self-bootstrapping package).