about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJens Reidel <adrian@travitia.xyz>2025-07-18 18:29:29 +0200
committerJosh Stone <jistone@redhat.com>2025-07-24 09:54:11 -0700
commit8791ef8a2a579b36f03f41dd69504bdee17cf361 (patch)
treed36c83ef8668b95365d7113b4cc419d1431dbbd8
parentc06b5868245bb2b4775397b68cfb609fa4b0ce14 (diff)
downloadrust-8791ef8a2a579b36f03f41dd69504bdee17cf361.tar.gz
rust-8791ef8a2a579b36f03f41dd69504bdee17cf361.zip
rustc_codegen_ssa: Don't skip target-features after crt-static
The current behaviour introduced by commit
a50a3b8e318594c41783294e440d864763e412ef would discard any
target features specified after crt-static (the only member of
RUSTC_SPECIFIC_FEATURES). This is because it returned instead of
continuing processing the next flag.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
(cherry picked from commit 664d742933e020f70032e0fd8cd9c8869848fd4f)
-rw-r--r--compiler/rustc_codegen_ssa/src/target_features.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/target_features.rs b/compiler/rustc_codegen_ssa/src/target_features.rs
index 67ac619091b..9d2aa92b7b8 100644
--- a/compiler/rustc_codegen_ssa/src/target_features.rs
+++ b/compiler/rustc_codegen_ssa/src/target_features.rs
@@ -176,14 +176,14 @@ fn parse_rust_feature_flag<'a>(
         if let Some(base_feature) = feature.strip_prefix('+') {
             // Skip features that are not target features, but rustc features.
             if RUSTC_SPECIFIC_FEATURES.contains(&base_feature) {
-                return;
+                continue;
             }
 
             callback(base_feature, sess.target.implied_target_features(base_feature), true)
         } else if let Some(base_feature) = feature.strip_prefix('-') {
             // Skip features that are not target features, but rustc features.
             if RUSTC_SPECIFIC_FEATURES.contains(&base_feature) {
-                return;
+                continue;
             }
 
             // If `f1` implies `f2`, then `!f2` implies `!f1` -- this is standard logical