@@ -41,8 +41,8 @@ use std::sync::Arc;
4141
4242use cranelift_codegen:: isa:: TargetIsa ;
4343use cranelift_codegen:: settings:: { self , Configurable } ;
44- use rustc_codegen_ssa:: CodegenResults ;
4544use rustc_codegen_ssa:: traits:: CodegenBackend ;
45+ use rustc_codegen_ssa:: { CodegenResults , TargetConfig } ;
4646use rustc_metadata:: EncodedMetadata ;
4747use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
4848use rustc_session:: Session ;
@@ -177,7 +177,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
177177 }
178178 }
179179
180- fn target_features_cfg ( & self , sess : & Session ) -> ( Vec < Symbol > , Vec < Symbol > ) {
180+ fn target_config ( & self , sess : & Session ) -> TargetConfig {
181181 // FIXME return the actually used target features. this is necessary for #[cfg(target_feature)]
182182 let target_features = if sess. target . arch == "x86_64" && sess. target . os != "none" {
183183 // x86_64 mandates SSE2 support and rustc requires the x87 feature to be enabled
@@ -196,7 +196,16 @@ impl CodegenBackend for CraneliftCodegenBackend {
196196 } ;
197197 // FIXME do `unstable_target_features` properly
198198 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+ }
200209 }
201210
202211 fn print_version ( & self ) {
0 commit comments