@@ -217,6 +217,14 @@ mod c {
217
217
}
218
218
}
219
219
220
+ // `compiler-rt` requires `COMPILER_RT_HAS_FLOAT16` to be defined to make it use the
221
+ // `_Float16` type for `f16` intrinsics. This shouldn't matter as all existing `f16`
222
+ // intrinsics have been ported to Rust in `compiler-builtins` as C compilers don't
223
+ // support `_Float16` on all targets (whereas Rust does). However, define the macro
224
+ // anyway to prevent issues like rust#118813 and rust#123885 silently reoccuring if more
225
+ // `f16` intrinsics get accidentally added here in the future.
226
+ cfg. define ( "COMPILER_RT_HAS_FLOAT16" , None ) ;
227
+
220
228
cfg. warnings ( false ) ;
221
229
222
230
if target_env == "msvc" {
@@ -288,13 +296,10 @@ mod c {
288
296
sources. extend ( & [
289
297
( "__divdc3" , "divdc3.c" ) ,
290
298
( "__divsc3" , "divsc3.c" ) ,
291
- ( "__extendhfsf2" , "extendhfsf2.c" ) ,
292
299
( "__muldc3" , "muldc3.c" ) ,
293
300
( "__mulsc3" , "mulsc3.c" ) ,
294
301
( "__negdf2" , "negdf2.c" ) ,
295
302
( "__negsf2" , "negsf2.c" ) ,
296
- ( "__truncdfhf2" , "truncdfhf2.c" ) ,
297
- ( "__truncsfhf2" , "truncsfhf2.c" ) ,
298
303
] ) ;
299
304
}
300
305
@@ -464,8 +469,6 @@ mod c {
464
469
if ( target_arch == "aarch64" || target_arch == "arm64ec" ) && consider_float_intrinsics {
465
470
sources. extend ( & [
466
471
( "__comparetf2" , "comparetf2.c" ) ,
467
- ( "__extenddftf2" , "extenddftf2.c" ) ,
468
- ( "__extendsftf2" , "extendsftf2.c" ) ,
469
472
( "__fixtfdi" , "fixtfdi.c" ) ,
470
473
( "__fixtfsi" , "fixtfsi.c" ) ,
471
474
( "__fixtfti" , "fixtfti.c" ) ,
@@ -476,8 +479,6 @@ mod c {
476
479
( "__floatsitf" , "floatsitf.c" ) ,
477
480
( "__floatunditf" , "floatunditf.c" ) ,
478
481
( "__floatunsitf" , "floatunsitf.c" ) ,
479
- ( "__trunctfdf2" , "trunctfdf2.c" ) ,
480
- ( "__trunctfsf2" , "trunctfsf2.c" ) ,
481
482
( "__addtf3" , "addtf3.c" ) ,
482
483
( "__multf3" , "multf3.c" ) ,
483
484
( "__subtf3" , "subtf3.c" ) ,
@@ -498,7 +499,6 @@ mod c {
498
499
499
500
if target_arch == "mips64" {
500
501
sources. extend ( & [
501
- ( "__extenddftf2" , "extenddftf2.c" ) ,
502
502
( "__netf2" , "comparetf2.c" ) ,
503
503
( "__addtf3" , "addtf3.c" ) ,
504
504
( "__multf3" , "multf3.c" ) ,
@@ -509,14 +509,11 @@ mod c {
509
509
( "__floatunsitf" , "floatunsitf.c" ) ,
510
510
( "__fe_getround" , "fp_mode.c" ) ,
511
511
( "__divtf3" , "divtf3.c" ) ,
512
- ( "__trunctfdf2" , "trunctfdf2.c" ) ,
513
- ( "__trunctfsf2" , "trunctfsf2.c" ) ,
514
512
] ) ;
515
513
}
516
514
517
515
if target_arch == "loongarch64" {
518
516
sources. extend ( & [
519
- ( "__extenddftf2" , "extenddftf2.c" ) ,
520
517
( "__netf2" , "comparetf2.c" ) ,
521
518
( "__addtf3" , "addtf3.c" ) ,
522
519
( "__multf3" , "multf3.c" ) ,
@@ -527,8 +524,6 @@ mod c {
527
524
( "__floatunsitf" , "floatunsitf.c" ) ,
528
525
( "__fe_getround" , "fp_mode.c" ) ,
529
526
( "__divtf3" , "divtf3.c" ) ,
530
- ( "__trunctfdf2" , "trunctfdf2.c" ) ,
531
- ( "__trunctfsf2" , "trunctfsf2.c" ) ,
532
527
] ) ;
533
528
}
534
529
0 commit comments