File tree 2 files changed +18
-9
lines changed
builtins-test-intrinsics/src
2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 13
13
#![ no_std]
14
14
#![ no_main]
15
15
16
+ // Ensure this `compiler_builtins` gets used, rather than the version injected from the sysroot.
17
+ extern crate compiler_builtins;
16
18
extern crate panic_handler;
17
19
18
20
#[ cfg( all( not( thumb) , not( windows) , not( target_arch = "wasm32" ) ) ) ]
@@ -592,7 +594,8 @@ fn run() {
592
594
bb ( floatunsitf ( bb ( 2 ) ) ) ;
593
595
bb ( floatuntidf ( bb ( 2 ) ) ) ;
594
596
bb ( floatuntisf ( bb ( 2 ) ) ) ;
595
- #[ cfg( f128_enabled) ]
597
+ // FIXME(windows): segfault on Windows
598
+ #[ cfg( all( f128_enabled, not( windows) ) ) ]
596
599
bb ( floatuntitf ( bb ( 2 ) ) ) ;
597
600
#[ cfg( f128_enabled) ]
598
601
bb ( gttf ( bb ( 2. ) , bb ( 2. ) ) ) ;
@@ -650,14 +653,14 @@ fn something_with_a_dtor(f: &dyn Fn()) {
650
653
651
654
#[ no_mangle]
652
655
#[ cfg( not( thumb) ) ]
653
- fn main ( _argc : core:: ffi:: c_int , _argv : * const * const u8 ) -> core:: ffi:: c_int {
656
+ extern "C" fn main ( _argc : core:: ffi:: c_int , _argv : * const * const u8 ) -> core:: ffi:: c_int {
654
657
run ( ) ;
655
658
0
656
659
}
657
660
658
661
#[ no_mangle]
659
662
#[ cfg( thumb) ]
660
- pub fn _start ( ) -> ! {
663
+ extern "C" fn _start ( ) -> ! {
661
664
run ( ) ;
662
665
loop { }
663
666
}
Original file line number Diff line number Diff line change @@ -120,15 +120,21 @@ done
120
120
121
121
rm -f " ${rlib_paths[@]} "
122
122
123
- build_intrinsics_test () {
124
- cargo build --target " $target " -v --package builtins-test-intrinsics " $@ "
123
+ run_intrinsics_test () {
124
+ if [ " ${NO_STD:- } " = " 1" ]; then
125
+ cmd=build
126
+ else
127
+ cmd=run
128
+ fi
129
+
130
+ cargo " $cmd " --target " $target " -v --package builtins-test-intrinsics " $@ "
125
131
}
126
132
127
133
# Verify that we haven't dropped any intrinsics/symbols
128
- build_intrinsics_test
129
- build_intrinsics_test --release
130
- build_intrinsics_test --features c
131
- build_intrinsics_test --features c --release
134
+ run_intrinsics_test
135
+ run_intrinsics_test --release
136
+ run_intrinsics_test --features c
137
+ run_intrinsics_test --features c --release
132
138
133
139
# Verify that there are no undefined symbols to `panic` within our
134
140
# implementations
You can’t perform that action at this time.
0 commit comments