about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-29 16:31:27 +0000
committerbors <bors@rust-lang.org>2025-04-29 16:31:27 +0000
commit74509131e85a97353c67c503ea32e148a56cf4bd (patch)
tree293f2e2e50223905110b3f460c08ee5381742ee1 /compiler/rustc_codegen_ssa/src
parentefcbb94dccbe0fcc1076f031f88332db4a6a2a52 (diff)
parentff6a9800a38f30161ea7f819e2808f9bf97b5864 (diff)
downloadrust-74509131e85a97353c67c503ea32e148a56cf4bd.tar.gz
rust-74509131e85a97353c67c503ea32e148a56cf4bd.zip
Auto merge of #140474 - tgross35:rollup-rdkao89, r=tgross35
Rollup of 7 pull requests

Successful merges:

 - #138344 (Enable `reliable_f16_math` on x86)
 - #139909 (implement or-patterns for pattern types)
 - #140392 (compiletest: Remove the libtest-based executor and its dependency)
 - #140400 (PassWrapper: adapt for llvm/llvm-project@d3d856ad8469)
 - #140422 (unwind: bump `unwinding` dependency to 0.2.6)
 - #140432 (Update documentation for `fn target_config`)
 - #140433 (Replace the \01__gnu_mcount_nc to LLVM intrinsic for additional ARM targets)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/backend.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/backend.rs b/compiler/rustc_codegen_ssa/src/traits/backend.rs
index e6b50cc7c0c..e2f1458d062 100644
--- a/compiler/rustc_codegen_ssa/src/traits/backend.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/backend.rs
@@ -45,15 +45,14 @@ pub trait CodegenBackend {
 
     fn print(&self, _req: &PrintRequest, _out: &mut String, _sess: &Session) {}
 
-    /// Returns two feature sets:
-    /// - The first has the features that should be set in `cfg(target_features)`.
-    /// - The second is like the first, but also includes unstable features.
-    ///
-    /// RUSTC_SPECIFIC_FEATURES should be skipped here, those are handled outside codegen.
+    /// Collect target-specific options that should be set in `cfg(...)`, including
+    /// `target_feature` and support for unstable float types.
     fn target_config(&self, _sess: &Session) -> TargetConfig {
         TargetConfig {
             target_features: vec![],
             unstable_target_features: vec![],
+            // `true` is used as a default so backends need to acknowledge when they do not
+            // support the float types, rather than accidentally quietly skipping all tests.
             has_reliable_f16: true,
             has_reliable_f16_math: true,
             has_reliable_f128: true,