diff options
| author | Laurențiu Nicola <lnicola@users.noreply.github.com> | 2024-11-01 12:26:18 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-01 12:26:18 +0000 |
| commit | cf6bc48353ba46fceb43f5efc37858c471d05bb7 (patch) | |
| tree | 0cff0055f2ed9e9d18df92e2d98f10d7b5359075 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | a5b5b466b0517124e8c5d8610d708aa04a1c4fc7 (diff) | |
| parent | 9acf57c48e0d55e7b2d07dae2bb4fbfc3fc010dd (diff) | |
| download | rust-cf6bc48353ba46fceb43f5efc37858c471d05bb7.tar.gz rust-cf6bc48353ba46fceb43f5efc37858c471d05bb7.zip | |
Merge pull request #18457 from lnicola/sync-from-rust
minor: Sync from downstream
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) |
