ferrocene: wire LLVM coverage tools into generated rust_toolchain - #34
Merged
Conversation
dcalavrezo-qorix
requested review from
AlexanderLanin,
MaximilianSoerenPollak and
nradakovic
as code owners
July 24, 2026 13:56
coverage-tools tarballs from ferrocene_toolchain_builder >= 1.3.0 additionally ship llvm-cov, llvm-profdata and llvm-cxxfilt built from the same LLVM tree as the Ferrocene rustc. ferrocene_toolchain_ext now detects these tools after extracting the coverage-tools archive and sets llvm_cov/llvm_profdata on the generated rust_toolchain. This is what makes rules_rust instrument crates (--codegen=instrument-coverage) and export RUST_LLVM_COV / RUST_LLVM_PROFDATA to the coverage runner under 'bazel coverage' - without it, Rust code silently produces no coverage data. - expose llvm-cov-bin / llvm-profdata-bin / llvm-cxxfilt-bin filegroups from the generated repo - bump all ferrocene_toolchain_builder pins 1.2.0 -> 1.3.0; only the coverage-tools tarball changed content, all other 1.3.0 assets are byte-identical to the previously pinned 1.2.0 ones (checksums verified) Backward compatible: coverage-tools tarballs without the llvm tools (<= 1.2.0) simply skip the wiring.
dcalavrezo-qorix
force-pushed
the
dcalavrezo_llvm_cov
branch
from
July 24, 2026 14:05
34b3651 to
2f2d852
Compare
MaximilianSoerenPollak
approved these changes
Jul 24, 2026
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Seems okay from my side.
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.
coverage-tools tarballs from ferrocene_toolchain_builder >= 1.3.0 additionally ship llvm-cov, llvm-profdata and llvm-cxxfilt built from the same LLVM tree as the Ferrocene rustc.
ferrocene_toolchain_ext now detects these tools after extracting the coverage-tools archive and sets llvm_cov/llvm_profdata on the generated rust_toolchain. This is what makes rules_rust instrument crates (--codegen=instrument-coverage) and export RUST_LLVM_COV / RUST_LLVM_PROFDATA to the coverage runner under 'bazel coverage' - without it, Rust code silently produces no coverage data.
Backward compatible: coverage-tools tarballs without the llvm tools (<= 1.2.0) simply skip the wiring.