@@ -11,6 +11,7 @@ fn main() {
11
11
. expect ( "CARGO_CFG_TARGET_POINTER_WIDTH was not set" )
12
12
. parse ( )
13
13
. unwrap ( ) ;
14
+ let is_miri = env:: var_os ( "CARGO_CFG_MIRI" ) . is_some ( ) ;
14
15
15
16
println ! ( "cargo:rustc-check-cfg=cfg(netbsd10)" ) ;
16
17
if target_os == "netbsd" && env:: var ( "RUSTC_STD_NETBSD10" ) . is_ok ( ) {
@@ -91,6 +92,8 @@ fn main() {
91
92
println ! ( "cargo:rustc-check-cfg=cfg(reliable_f128_math)" ) ;
92
93
93
94
let has_reliable_f16 = match ( target_arch. as_str ( ) , target_os. as_str ( ) ) {
95
+ // We can always enable these in Miri as that is not affected by codegen bugs.
96
+ _ if is_miri => true ,
94
97
// Selection failure until recent LLVM <https://github.com/llvm/llvm-project/issues/93894>
95
98
// FIXME(llvm19): can probably be removed at the version bump
96
99
( "loongarch64" , _) => false ,
@@ -118,6 +121,8 @@ fn main() {
118
121
} ;
119
122
120
123
let has_reliable_f128 = match ( target_arch. as_str ( ) , target_os. as_str ( ) ) {
124
+ // We can always enable these in Miri as that is not affected by codegen bugs.
125
+ _ if is_miri => true ,
121
126
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
122
127
( "arm64ec" , _) => false ,
123
128
// ABI and precision bugs <https://github.com/rust-lang/rust/issues/125109>
@@ -141,6 +146,8 @@ fn main() {
141
146
// LLVM is currenlty adding missing routines, <https://github.com/llvm/llvm-project/issues/93566>
142
147
let has_reliable_f16_math = has_reliable_f16
143
148
&& match ( target_arch. as_str ( ) , target_os. as_str ( ) ) {
149
+ // FIXME: Disabled on Miri as the intrinsics are not implemented yet.
150
+ _ if is_miri => false ,
144
151
// Currently nothing special. Hooray!
145
152
// This will change as platforms gain better better support for standard ops but math
146
153
// lags behind.
@@ -149,6 +156,8 @@ fn main() {
149
156
150
157
let has_reliable_f128_math = has_reliable_f128
151
158
&& match ( target_arch. as_str ( ) , target_os. as_str ( ) ) {
159
+ // FIXME: Disabled on Miri as the intrinsics are not implemented yet.
160
+ _ if is_miri => false ,
152
161
// LLVM lowers `fp128` math to `long double` symbols even on platforms where
153
162
// `long double` is not IEEE binary128. See
154
163
// <https://github.com/llvm/llvm-project/issues/44744>.
0 commit comments