diff options
| author | Laurențiu Nicola <lnicola@dend.ro> | 2024-11-01 13:14:25 +0200 |
|---|---|---|
| committer | Laurențiu Nicola <lnicola@dend.ro> | 2024-11-01 13:14:25 +0200 |
| commit | d94c49c0e8e1c2952140afe9ef4a5133169b273f (patch) | |
| tree | e7957939215c9926d1f08f20d5cbb108e51505e4 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | 21544d8b40286e24270cbee49df4f998d67ae9eb (diff) | |
| parent | 145f9cf95de1fbde3fa11e98461310e0373253e6 (diff) | |
| download | rust-d94c49c0e8e1c2952140afe9ef4a5133169b273f.tar.gz rust-d94c49c0e8e1c2952140afe9ef4a5133169b273f.zip | |
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index aa38c02289d..9adb1299b3d 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -698,12 +698,9 @@ fn backend_feature_name<'a>(sess: &Session, s: &'a str) -> Option<&'a str> { let feature = s .strip_prefix(&['+', '-'][..]) .unwrap_or_else(|| sess.dcx().emit_fatal(InvalidTargetFeaturePrefix { feature: s })); - if s.is_empty() { - return None; - } // Rustc-specific feature requests like `+crt-static` or `-crt-static` // are not passed down to LLVM. - if RUSTC_SPECIFIC_FEATURES.contains(&feature) { + if s.is_empty() || RUSTC_SPECIFIC_FEATURES.contains(&feature) { return None; } Some(feature) |
