-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not pass through features without +/- prefix
LLVM really dislikes this and will assert, saying something along the lines of: ``` rustc: llvm/lib/MC/MCSubtargetInfo.cpp:60: void ApplyFeatureFlag( llvm::FeatureBitset&, llvm::StringRef, llvm::ArrayRef<llvm::SubtargetFeatureKV> ): Assertion `SubtargetFeatures::hasFlag(Feature) && "Feature flags should start with '+' or '-'"` failed. ```
- Loading branch information
Showing
3 changed files
with
28 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// compile-flags: -Ctarget-feature=rdrand --crate-type=rlib --target=x86_64-unknown-linux-gnu | ||
// build-pass | ||
// needs-llvm-components: x86 | ||
|
||
#![feature(no_core)] | ||
#![no_core] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
warning: unknown feature specified for `-Ctarget-feature`: `rdrand` | ||
| | ||
= note: features must begin with a `+` to enable or `-` to disable it | ||
|
||
warning: 1 warning emitted | ||
|