Repository navigation
An SDK package must bootstrap the next SDK build; CI seeds generation zero from the host (#1259) - #1262
Merged
Conversation
Contributor
Author
|
Battery (seed-driven, worktree): build rc=0, :fixpoint rc=0, :test — every lane green except |
… zero from the host Every published SDK asset fails `sdk-ninja`'s bootstrap check (CI red on all four non-mac lanes since #1210 added .github/actions/source-sdk): linux x86_64 v0.15.1 keeps `bin/clang -> clang-22` and `bin/clang++ -> clang` as links with no clang-22 in the archive and no share/ (cmake without its modules); windows x86_64 ships cmake.exe without share/cmake-* (CMAKE_ROOT); the linux/windows aarch64 assets are older builds with no cmake or ninja. None was produced by build/sdk.w's packager (no With code or workflow writes .tar.zst); they predate it. build/sdk.w: the unix tool selection includes the driver the links resolve to (`bin/clang-<major>`, from COMPILER_LLVM_VERSION), and run_package_llvm_sdk_action refuses an archive whose manifest lacks any of the bootstrap set (driver, links, cmake + share/cmake-X.Y/Modules, ninja) — "SDK archive cannot bootstrap the next SDK build: missing …". The contract test pins the selection on every platform. .github/actions/source-sdk: before building, each bootstrap tool that is missing or dangling in the fetched asset (cmake also needs its module tree) is copied from the runner's toolchain with a loud line naming the source; the package that run produces then bootstraps itself. Once such a package is published on every platform the seeding never triggers.
Contributor
Author
ehartford
force-pushed
the
sdk-package-bootstraps
branch
from
September 21, 2026 22:01
ecde4ad to
85c2837
Compare
ehartford
marked this pull request as ready for review
September 21, 2026 22:01
ehartford
pushed a commit
that referenced
this pull request
Sep 21, 2026
…anion trees (Windows) A copied cmake cannot find CMAKE_ROOT and a copied clang loses lib/clang: each locates its trees relative to its own executable (#1262 CI run on 85c2837: seeded /usr/local/bin/cmake, then 'Could not find CMAKE_ROOT'). Unix seeds resolve through a symlink to the real path; Windows, where cmake does not resolve links, copies share/cmake-* and lib/clang alongside.
This was referenced Sep 21, 2026
ehartford
added a commit
that referenced
this pull request
Sep 22, 2026
…s (Windows), from the runner's tool, never the asset's own (#1265) * source-sdk: seed by symlink (unix) or with companion trees (Windows), 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. * source-sdk: a seeded run rebuilds the SDK with its own stage-1 tools 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. * source-sdk: the fetched SDK is never written to; seeds live in a separate 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. * source-sdk: resolve Chocolatey shims to the real executable; a seed that 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. * source-sdk: on Windows take the real ninja (Chocolatey lib/ or Visual 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. * sdk-cmake on Windows is an MSVC-style build: clang-cl, lld-link, mt.exe 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. --------- Co-authored-by: Eric Hartford <[email protected]>
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.
Draft: battery running. Expect
spec-inventory-checkred from #1210's@[import_module]until its spec sentence lands — reported separately.Fixes #1259. Every published SDK asset fails
sdk-ninja's bootstrap check (CI red on all four non-mac lanes since #1210 added.github/actions/source-sdk): the linux x86_64 asset keepsbin/clang -> clang-22as a link with noclang-22in the archive and noshare/; windows shipscmake.exewithoutshare/cmake-*; the aarch64 assets have no cmake/ninja. None was produced bybuild/sdk.w's packager — they predate it.build/sdk.w: the unix selection includesbin/clang-<major>(the driver the links resolve to);run_package_llvm_sdk_actionrefuses an archive that cannot bootstrap the next build (driver, links, cmake + module tree, ninja); the contract test pins the selection on every platform..github/actions/source-sdk: each bootstrap tool missing or dangling in the fetched asset is copied from the runner's toolchain with a loud line naming the source; the package that run produces then bootstraps itself. Once such a package is published on every platform (release runbook: republish + bumpWITH_SDK_VERSION), the seeding never triggers.