File tree 4 files changed +35
-0
lines changed
4 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // HACK(https://github.com/rust-lang/rust/issues/62785): uefi targets need special LLVM support
2
+ // unless we emit the _fltused
3
+ #[ cfg( target_os = "uefi" ) ]
4
+ #[ no_mangle]
5
+ #[ used]
6
+ static _fltused: i32 = 0 ;
Original file line number Diff line number Diff line change @@ -213,6 +213,7 @@ pub mod dec2flt;
213
213
pub mod bignum;
214
214
pub mod diy_float;
215
215
216
+ mod float;
216
217
mod wrapping;
217
218
218
219
macro_rules! usize_isize_to_xe_bytes_doc {
Original file line number Diff line number Diff line change
1
+ // build-pass
2
+ // https://github.com/rust-lang/rust/issues/62785
3
+
4
+ #![ no_std]
5
+ #![ no_main]
6
+ use core:: fmt:: { Write , Error } ;
7
+
8
+ struct Dummy ;
9
+
10
+ impl Write for Dummy {
11
+ fn write_str ( & mut self , _s : & str ) -> Result < ( ) , Error > {
12
+ Ok ( ( ) )
13
+ }
14
+ }
15
+
16
+ #[ no_mangle]
17
+ pub extern "C" fn efi_main ( ) -> i32 {
18
+ write ! ( Dummy , "Hello, world!" ) . unwrap ( ) ;
19
+ 0
20
+ }
21
+
22
+ #[ panic_handler]
23
+ fn panic ( _info : & core:: panic:: PanicInfo ) -> ! {
24
+ loop { }
25
+ }
Original file line number Diff line number Diff line change @@ -44,6 +44,9 @@ const EXCEPTION_PATHS: &[&str] = &[
44
44
// target_os to tell targets with different LLVM-versions appart
45
45
// (e.g. `wasm32-unknown-emscripten` vs `wasm32-unknown-unknown`):
46
46
"src/libcore/hint.rs" ,
47
+ // HACK(https://github.com/rust-lang/rust/issues/62785): uefi targets need special LLVM support
48
+ // unless we emit the _fltused
49
+ "src/libcore/num/float.rs" ,
47
50
"src/libstd/sys/" , // Platform-specific code for std lives here.
48
51
// This has the trailing slash so that sys_common is not excepted.
49
52
"src/libstd/os" , // Platform-specific public interfaces
You can’t perform that action at this time.
0 commit comments