@@ -28,16 +28,20 @@ extern "Rust" {
2828 // The rustc fork of LLVM 14 and earlier also special-cases these function names to be able to optimize them
2929 // like `malloc`, `realloc`, and `free`, respectively.
3030 #[ rustc_allocator]
31- #[ rustc_allocator_nounwind]
31+ #[ cfg_attr( not( bootstrap) , rustc_nounwind) ]
32+ #[ cfg_attr( bootstrap, rustc_allocator_nounwind) ]
3233 fn __rust_alloc ( size : usize , align : usize ) -> * mut u8 ;
3334 #[ rustc_deallocator]
34- #[ rustc_allocator_nounwind]
35+ #[ cfg_attr( not( bootstrap) , rustc_nounwind) ]
36+ #[ cfg_attr( bootstrap, rustc_allocator_nounwind) ]
3537 fn __rust_dealloc ( ptr : * mut u8 , size : usize , align : usize ) ;
3638 #[ rustc_reallocator]
37- #[ rustc_allocator_nounwind]
39+ #[ cfg_attr( not( bootstrap) , rustc_nounwind) ]
40+ #[ cfg_attr( bootstrap, rustc_allocator_nounwind) ]
3841 fn __rust_realloc ( ptr : * mut u8 , old_size : usize , align : usize , new_size : usize ) -> * mut u8 ;
3942 #[ rustc_allocator_zeroed]
40- #[ rustc_allocator_nounwind]
43+ #[ cfg_attr( not( bootstrap) , rustc_nounwind) ]
44+ #[ cfg_attr( bootstrap, rustc_allocator_nounwind) ]
4145 fn __rust_alloc_zeroed ( size : usize , align : usize ) -> * mut u8 ;
4246}
4347
0 commit comments