Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bd15dd1

Browse files
committedApr 29, 2025
Auto merge of #140424 - tgross35:float-experiments, r=<try>
[experiment] reliable float experiments Trying a few blocked things based on top of #140323. r? `@ghost` try-job: x86_64-gnu-llvm-19-1 try-job: x86_64-gnu-llvm-20-1
2 parents 25cdf1f + e56745d commit bd15dd1

File tree

47 files changed

+1568
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1568
-385
lines changed
 

‎compiler/rustc_codegen_cranelift/src/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ use std::sync::Arc;
4141

4242
use cranelift_codegen::isa::TargetIsa;
4343
use cranelift_codegen::settings::{self, Configurable};
44-
use rustc_codegen_ssa::CodegenResults;
4544
use rustc_codegen_ssa::traits::CodegenBackend;
45+
use rustc_codegen_ssa::{CodegenResults, TargetConfig};
4646
use rustc_metadata::EncodedMetadata;
4747
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
4848
use rustc_session::Session;
@@ -178,7 +178,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
178178
}
179179
}
180180

181-
fn target_features_cfg(&self, sess: &Session) -> (Vec<Symbol>, Vec<Symbol>) {
181+
fn target_config(&self, sess: &Session) -> TargetConfig {
182182
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
183183
let target_features = if sess.target.arch == "x86_64" && sess.target.os != "none" {
184184
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
@@ -197,7 +197,16 @@ impl CodegenBackend for CraneliftCodegenBackend {
197197
};
198198
// FIXME do `unstable_target_features` properly
199199
let unstable_target_features = target_features.clone();
200-
(target_features, unstable_target_features)
200+
201+
TargetConfig {
202+
target_features,
203+
unstable_target_features,
204+
// Cranelift does not yet support f16 or f128
205+
has_reliable_f16: false,
206+
has_reliable_f16_math: false,
207+
has_reliable_f128: false,
208+
has_reliable_f128_math: false,
209+
}
201210
}
202211

203212
fn print_version(&self) {

‎compiler/rustc_codegen_gcc/src/gcc_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub(crate) fn global_gcc_features(sess: &Session, diagnostics: bool) -> Vec<Stri
5555
)
5656
} else if let Some(feature) = feature.strip_prefix('-') {
5757
// FIXME: Why do we not remove implied features on "-" here?
58-
// We do the equivalent above in `target_features_cfg`.
58+
// We do the equivalent above in `target_config`.
5959
// See <https://github.com/rust-lang/rust/issues/134792>.
6060
all_rust_features.push((false, feature));
6161
} else if !feature.is_empty() && diagnostics {

0 commit comments

Comments
 (0)
Please sign in to comment.