-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc silently ignores invalid -C target-feature names #44815
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-target-feature
Area: Enabling/disabling target features like AVX, Neon, etc.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
TimNN
added
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
labels
Sep 26, 2017
This is happening inside LLVM and plausibly should be filed with that project. |
rust/src/librustc_trans/back/write.rs Lines 119 to 121 in ded38db
|
22 tasks
Also rustc:
|
RalfJung
added a commit
to RalfJung/rust
that referenced
this issue
May 15, 2020
cmdline: Make target features individually overridable Fixes rust-lang#56527 Previously `-C target-feature=+avx2 -C target-feature=+fma` was equivalent to `-C target-feature=+fma` because the later `-C target-feature` option fully overridden previous `-C target-feature`. With this PR `-C target-feature=+avx2 -C target-feature=+fma` is equivalent to `-C target-feature=+avx2,+fma` and the options are combined. I'm not sure where the comma-separated features in a single option came from (clang uses a scheme with single feature per-option), but logically these features are entirely independent options. So they should be overridable individually as well to be more useful in hierarchical build system, and more consistent with other rustc options and clang behavior as well. Target feature options have a few other issues (rust-lang#44815), but fixing those is going to be a bit more invasive.
RalfJung
added a commit
to RalfJung/rust
that referenced
this issue
May 16, 2020
cmdline: Make target features individually overridable Fixes rust-lang#56527 Previously `-C target-feature=+avx2 -C target-feature=+fma` was equivalent to `-C target-feature=+fma` because the later `-C target-feature` option fully overridden previous `-C target-feature`. With this PR `-C target-feature=+avx2 -C target-feature=+fma` is equivalent to `-C target-feature=+avx2,+fma` and the options are combined. I'm not sure where the comma-separated features in a single option came from (clang uses a scheme with single feature per-option), but logically these features are entirely independent options. So they should be overridable individually as well to be more useful in hierarchical build system, and more consistent with other rustc options and clang behavior as well. Target feature options have a few other issues (rust-lang#44815), but fixing those is going to be a bit more invasive.
crlf0710
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Jun 11, 2020
workingjubilee
added
the
A-target-feature
Area: Enabling/disabling target features like AVX, Neon, etc.
label
Mar 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-target-feature
Area: Enabling/disabling target features like AVX, Neon, etc.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Compiling a simple
Hello, World
program:Should
RUSTFLAGS=-Ctarget-feature=+crt-staticzzzz
be silently accepted?If I pass
RUSTFLAGS=-Ctarget-feature=+batman
, a warning is printed, as expected.Why is trailing misspelling silently allowed?
The text was updated successfully, but these errors were encountered: