Repository navigation
Conversation
Extend catalogue headers with platform mappings, archive layout and configuration requirements. Preserve optional-tool fixes from bazel-contrib#935 and verify real compiler-only packages with system C++ runtimes. Co-authored-by: Ravi Agarwal <223930721+ravi-pplx@users.noreply.github.com> Signed-off-by: helly25 <6420169+helly25@users.noreply.github.com>
helly25
requested review from
dzbarsky,
fmeum,
jsharpe and
rrbutani
as code owners
November 9, 2026 00:37
Signed-off-by: helly25 <6420169+helly25@users.noreply.github.com>
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.
Support constrained LLVM distributions using provider-neutral catalogue-header metadata, with opt-in profiles for hermetic-llvm and the MSan packages used by mbo/xff.
Implementation
Extend
_metawithout changing the existingarchive: sha256entries. Profiles are attached to the actual extracted compiler and follow feature-override archive reuse. Validation uses the consuming configuration, works with Bazel 7's exec-configured tool inputs, and ignores inactive variants/nonmatching target platforms.Bring forward the optional-tool and libc++-header work from #935 by @ravi-pplx, plus the WORKSPACE Wasm dependency-order fix discovered while testing that PR. Also handle missing top-level headers,
llvm-as, compiler-runtime directories, and optional dwp/profdata inputs. Required compiler/linker tools and Clang resource headers remain required.Add a curated, checksum-pinned, opt-in
hermetic_llvm.jsoncfor releasellvm-23.1.2-2. Its header requires libstdc++ on Linux and excludes sanitizer features because the packages contain no sanitizer runtimes. The regular LLVM catalogue remains the default; this is not a switch to hermetic-llvm's Bazel toolchain/module or a complete hermetic target environment.Add
msan.jsoncfor RealtimeRoboticsGroup/toolchains LLVM 22.1.8 and its matched MSan libc++ packages, selected through the existing feature-override mechanism. The compiler/runtime pair requiresmsanand bundled libc++; ordinary target and execution configurations retain their default compiler. Migrate the existing MSan CI configuration from manual URLs/checksums to this catalogue. This PR does not modify mbo or xff.Generic
_meta.overlaysentries select companion archives by exact LLVM version and execution platform, verify their SHA-256 and extract them into a named subdirectory. Missing matches fail rather than silently mixing runtime versions. A cataloguedlibcxx-msanoverlay rejects a conflicting manuallibcxx_url; the legacy optional overlay remains supported for ordinary compilers. Document both profiles and the generic schema, with a ready-to-use README MSan example.Verification
//toolchain/...tests pass with Bazel 9.3.0 Bzlmod and Bazel 7.7.2 WORKSPACE, including unchanged official-distribution golden tests.layering_check. Absent/explicitly disabled MSan restores the ordinary compiler. MSan+UBSan also passes with Bazel 9.3.0. The local Docker test uses a per-container seccomp exception for MSan's process-localpersonality(ADDR_NO_RANDOMIZE)call; no host/VM ASLR setting was changed.git diff --checkpass.Both opt-in catalogues are currently curated separately from the official updater. The hermetic-llvm profile does not supply sanitizer runtimes or an Apple LTO plugin; the MSan profile supplies its matched instrumented libc++ overlay.