"Stability" of the -C passes
and -C llvm-args
flags
#40063
Labels
A-cranelift
Things relevant to the [future] cranelift backend
A-gcc
Things relevant to the [future] GCC backend
A-stability
Area: `#[stable]`, `#[unstable]` etc.
C-bug
Category: This is a bug.
I-needs-decision
Issue: In need of a decision.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-dev-tools
Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
These flags are part of the stable
rustc
CLI but they let you tap into LLVM internals that we can't guarantee the stability of. Known usages of these flags include:Generating code coverage files. Works on stable
Fuzzing (
cargo fuzz
). This additionally requires using a sanitizer so it requires nightly.Concerns:
An LLVM upgrade may break the functionality exposed by these flags. An LLVM pass may be removed or renamed, the code coverage format may change, etc.
These flags may pose an obstacle for the adoption of non-LLVM backends (like Cranelift). For example,
-C llvm-args
has no meaning for the Cranelift backend.We discussed this a bit towards the end of the last tools meeting. Some ways to communicate the unstability of these flags were brought up:
Discourage their use. Something along these lines:
-C help
, and print a warning if they are used-Z unstable-options
flag.Document what are the real stability guarantees of the functionality exposed by
-C
flags.Provide more targeted unstable
-Z
flags for the LLVM functionality that can be accessed through these flags and encourage users to use those instead the-C
ones. For example,-Z fuzz
,-Z code-coverage
, etc.cc @rust-lang/tools
The text was updated successfully, but these errors were encountered: