File tree Expand file tree Collapse file tree 4 files changed +35
-0
lines changed Expand file tree Collapse file tree 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;
213213pub mod bignum;
214214pub mod diy_float;
215215
216+ mod float;
216217mod wrapping;
217218
218219macro_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] = &[
4444 // target_os to tell targets with different LLVM-versions appart
4545 // (e.g. `wasm32-unknown-emscripten` vs `wasm32-unknown-unknown`):
4646 "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" ,
4750 "src/libstd/sys/" , // Platform-specific code for std lives here.
4851 // This has the trailing slash so that sys_common is not excepted.
4952 "src/libstd/os" , // Platform-specific public interfaces
You can’t perform that action at this time.
0 commit comments