Repository navigation
release: publish llvm-ld-coff prebuilt binaries for eight hosts on v* tags - #36
Merged
Merged
Conversation
… tags llvm-ld is LLD's COFF linker (the lld-link/MSVC and MinGW drivers) as a shared library, and it has never published a binary. reld wants to link Windows targets through it without ever compiling LLVM itself, which needs a pinned, checksummed prebuilt per host. `release.yml` builds eight hosts natively: Windows x64/arm64, Linux glibc and musl on x64/arm64 (musl in Alpine), and macOS arm64/x64 (x64 cross-built on arm64, smoke-tested under Rosetta). `tools/release_build.py` configures with ci.yml's flags, builds the library and runner, runs the ABI smoke test against the fresh library, and packages the header, the runner, and the license and provenance notices. Linux builds link libstdc++ statically, so the .so loads on hosts with an older C++ runtime. Assets are named `llvm-ld-coff-<version>-<host-triple>`. The triple is the host the library runs on; every archive links Windows PE/COFF, so the Linux and macOS builds are Windows cross-linkers. A tag publishes all eight with SHA256SUMS; a PR touching the release path builds the full matrix without publishing, so a tag never meets a broken leg for the first time. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
zackees
force-pushed
the
ci/publish-releases
branch
from
September 18, 2026 22:52
5427289 to
86d9f33
Compare
…r yet The committed payload is exactly the files the x86_64 Windows and Linux builds read. aarch64 Linux and macOS builds read a few more upstream files (for example libc/src/__support/FPUtil/aarch64/nearest_integer.h and llvm/cmake/modules/UseLibtool.cmake), so the release matrix fails on them before compiling reld-relevant code. tools/prepare_discovery_tree.py rebuilds the pre-closure tree: full upstream at the pinned commit, minus the reviewed directory prune, with the declared patched files taken from the committed payload. closure-discovery.yml builds over it on each uncovered host and audits what the build read, exactly as ci.yml does. The per-host closures are then merged with tools/merge_llvm_closures.py and the payload re-materialized, so every added file is byte-identical upstream. Checked locally against the llvmorg-23.1.0 release tarball: all 5,609 files in the committed closure are present in the discovery tree with identical SHA-256, including the five declared patches, so the tarball matches the pinned commit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
LLVM prepends llvm/cmake/modules to CMAKE_MODULE_PATH, so an upstream FindLibXml2.cmake in the discovery tree shadows llvm-ld's find-shim and makes configure look for a system libxml2 instead of the vendored one. The musl leg failed on exactly that; hosts that have a system libxml2 would instead have configured a different build than production and put FindLibXml2.cmake into the merged closure. Every module in cmake/find-shims/ is now excluded. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…inja with -t inputs All four hosts compiled llvm-ld-coff over the discovery tree; only the audit after it failed. audit_build.py reads CMake's codemodel reply, which configure writes only when the query file exists beforehand (ci.yml creates it), and Alpine's ninja predates `-t inputs`, so the musl leg installs ninja from PyPI. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Closure discovery on the four hosts the payload did not cover (aarch64 glibc and musl Linux, arm64 and x86_64 macOS) found 62 upstream files their builds read: aarch64 math headers under libc/src/__support/, Apple-only CMake modules (UseLibtool.cmake, FindLibEdit.cmake), and headers LLVM's CMake picks up by globbing. The four closures were normalized, merged with the committed one, and the payload re-materialized; tools/verify.py passes. All 62 files are byte- identical upstream and no existing payload file changed. macOS depfiles record headers in the case their #include used (llvm/ASMParser/ for upstream llvm/AsmParser/), which a case-sensitive checkout cannot find, so normalize_closure.py gains --canonicalize-against to resolve path case against the upstream tree; it dropped exactly the eight case-duplicates of existing entries. merge_llvm_closures.py's derivation string now names the macOS hosts, and PROVENANCE.md documents host coverage and the discovery procedure. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… stand-in The reproducer rebuilds its upstream stand-in from the pre-strip commit, which predates the aarch64/macOS host-coverage files, so it could not reproduce them. Like CrossCompile.cmake already, locked unpatched files the commit lacks now come from the committed payload (hash-locked in the closure and checked against the upstream tarball when added). Declared patched files are never backfilled, so the test still proves the prune list and patches reproduce the payload; the negative control still rejects a tampered input. Co-Authored-By: Claude Opus 5 (1M context) <[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.
Publishes prebuilt llvm-ld-coff binaries on this repo's Releases page, so consumers such as reld can link Windows targets through llvm-ld without compiling LLVM.
What llvm-ld-coff is
LLD's COFF linker (the lld-link/MSVC and MinGW drivers) as a shared library behind the C ABI in
llvm_ld.h. Every build links Windows PE/COFF executables and DLLs. The triple in an asset's name is the host the library runs on, never the target it links, so the Linux and macOS builds are Windows cross-linkers. Assets are namedllvm-ld-coff-<version>-<host-triple>to keep that unambiguous.Hosts
windows-2025,windows-11-arm.zipwithllvm_ld.dll+llvm_ld.libubuntu-24.04,ubuntu-24.04-arm.soloads on older hostsalpine:3.20macos-14CMAKE_OSX_ARCHITECTURES=x86_64, smoke-tested under RosettaHow
tools/release_build.pyconfigures with the same flags asci.yml, buildsllvm_ld,llvm-ld-runnerandabi_smoke, then runs the ABI smoke test against the freshly built library. It packages the library, header, runner and license/provenance notices into one top-level directory. It has unit tests intests/test_release_build.py..github/workflows/release.ymlbuilds all eight hosts. On av*tag,publishchecks that exactly 8 archives exist, writesSHA256SUMS, and creates the release. A PR touching the release path builds the full matrix without publishing, so a tag never hits a broken leg for the first time. This PR is that run.ci.ymlis unchanged.Verification
python3 -m unittest discover -s tests -p 'test_*.py'passes, including 7 new packaging tests: naming, per-OS library names, static libstdc++ on Linux, macOS x64 cross-build, zip vs. tarball layout, and a loud failure on missing build output.release_build.py --triple x86_64-unknown-linux-gnuconfigures, imports the payload and builds on a Linux host.releaserun is the real check: all 8 legs build, smoke-test and package.🤖 Generated with Claude Code