@@ -41,8 +41,8 @@ use std::sync::Arc;
41
41
42
42
use cranelift_codegen:: isa:: TargetIsa ;
43
43
use cranelift_codegen:: settings:: { self , Configurable } ;
44
- use rustc_codegen_ssa:: CodegenResults ;
45
44
use rustc_codegen_ssa:: traits:: CodegenBackend ;
45
+ use rustc_codegen_ssa:: { CodegenResults , TargetConfig } ;
46
46
use rustc_metadata:: EncodedMetadata ;
47
47
use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
48
48
use rustc_session:: Session ;
@@ -177,7 +177,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
177
177
}
178
178
}
179
179
180
- fn target_features_cfg ( & self , sess : & Session ) -> ( Vec < Symbol > , Vec < Symbol > ) {
180
+ fn target_config ( & self , sess : & Session ) -> TargetConfig {
181
181
// FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
182
182
let target_features = if sess. target . arch == "x86_64" && sess. target . os != "none" {
183
183
// x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
@@ -196,7 +196,16 @@ impl CodegenBackend for CraneliftCodegenBackend {
196
196
} ;
197
197
// FIXME do `unstable_target_features` properly
198
198
let unstable_target_features = target_features. clone ( ) ;
199
- ( target_features, unstable_target_features)
199
+
200
+ TargetConfig {
201
+ target_features,
202
+ unstable_target_features,
203
+ // Cranelift does not yet support f16 or f128
204
+ has_reliable_f16 : false ,
205
+ has_reliable_f16_math : false ,
206
+ has_reliable_f128 : false ,
207
+ has_reliable_f128_math : false ,
208
+ }
200
209
}
201
210
202
211
fn print_version ( & self ) {
0 commit comments