-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
"Stability" of the -C passes and -C llvm-args flags #40063
Copy link
Copy link
Open
Labels
A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-gccThings relevant to the [future] GCC backendThings relevant to the [future] GCC backendA-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-gccThings relevant to the [future] GCC backendThings relevant to the [future] GCC backendA-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.Relevant to the dev-tools subteam, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
These flags are part of the stable
rustcCLI 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-argshas 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-optionsflag.Document what are the real stability guarantees of the functionality exposed by
-Cflags.Provide more targeted unstable
-Zflags for the LLVM functionality that can be accessed through these flags and encourage users to use those instead the-Cones. For example,-Z fuzz,-Z code-coverage, etc.cc @rust-lang/tools