Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
# `cargo llvm-cov --workspace --lcov --output-path coverage-rust.lcov`
# which sets the rest of the pipeline (LLVM_PROFILE_FILE, branch
# coverage, HTML output, etc.).
[build]
# Coverage instrumentation applied only to native (host) builds.
# Cross-compilation targets (wasm, etc.) are excluded because
# the profiler runtime is not available outside the host triple.
[target.x86_64-pc-windows-msvc]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Apply coverage rustflags to host targets

On non-Windows hosts this target table never applies: the Rust build/coverage jobs I checked run on ubuntu-latest, while Cargo documents [target.<triple>].rustflags as flags for that specific target triple. This drops the intended -C instrument-coverage repo config for Linux/macOS native coverage runs; use the actual host triple or a cfg target such as cfg(not(target_arch = "wasm32")) instead of the Windows MSVC triple.

Useful? React with 👍 / 👎.

rustflags = ["-C", "instrument-coverage"]

# Convenience aliases so BytePort contributors can run coverage
Expand Down
Loading
Loading