6
6
#![ allow( unused_features) ]
7
7
#![ cfg_attr( thumb, no_main) ]
8
8
#![ deny( dead_code) ]
9
+ #![ feature( alloc_system) ]
9
10
#![ feature( asm) ]
10
11
#![ feature( compiler_builtins_lib) ]
11
12
#![ feature( core_float) ]
12
13
#![ feature( lang_items) ]
13
- #![ feature( libc) ]
14
14
#![ feature( start) ]
15
15
#![ feature( i128_type) ]
16
16
#![ no_std]
17
17
18
18
#[ cfg( not( thumb) ) ]
19
- extern crate libc ;
19
+ extern crate alloc_system ;
20
20
extern crate compiler_builtins;
21
21
22
22
// NOTE cfg(not(thumbv6m)) means that the operation is not supported on ARMv6-M at all. Not even
@@ -27,7 +27,6 @@ extern crate compiler_builtins;
27
27
// convention for its intrinsics that's different from other architectures; that's why some function
28
28
// have an additional comment: the function name is the ARM name for the intrinsic and the comment
29
29
// in the non-ARM name for the intrinsic.
30
- #[ cfg( feature = "c" ) ]
31
30
mod intrinsics {
32
31
use core:: num:: Float ;
33
32
@@ -339,7 +338,6 @@ mod intrinsics {
339
338
}
340
339
}
341
340
342
- #[ cfg( feature = "c" ) ]
343
341
fn run ( ) {
344
342
use intrinsics:: * ;
345
343
@@ -404,33 +402,20 @@ fn run() {
404
402
bb ( modti3 ( bb ( 2 ) , bb ( 2 ) ) ) ;
405
403
}
406
404
407
- #[ cfg( all ( feature = "c" , not( thumb) ) ) ]
405
+ #[ cfg( not( thumb) ) ]
408
406
#[ start]
409
407
fn main ( _: isize , _: * const * const u8 ) -> isize {
410
408
run ( ) ;
411
-
412
- 0
413
- }
414
-
415
- #[ cfg( all( not( feature = "c" ) , not( thumb) ) ) ]
416
- #[ start]
417
- fn main ( _: isize , _: * const * const u8 ) -> isize {
418
409
0
419
410
}
420
411
421
- #[ cfg( all ( feature = "c" , thumb) ) ]
412
+ #[ cfg( thumb) ]
422
413
#[ no_mangle]
423
414
pub fn _start ( ) -> ! {
424
415
run ( ) ;
425
416
loop { }
426
417
}
427
418
428
- #[ cfg( all( not( feature = "c" ) , thumb) ) ]
429
- #[ no_mangle]
430
- pub fn _start ( ) -> ! {
431
- loop { }
432
- }
433
-
434
419
// ARM targets need these symbols
435
420
#[ no_mangle]
436
421
pub fn __aeabi_unwind_cpp_pr0 ( ) { }
@@ -447,9 +432,11 @@ pub fn _Unwind_Resume() {}
447
432
#[ cfg( not( test) ) ]
448
433
#[ lang = "eh_personality" ]
449
434
#[ no_mangle]
435
+ #[ allow( private_no_mangle_fns) ]
450
436
extern "C" fn eh_personality ( ) { }
451
437
452
438
#[ cfg( not( test) ) ]
453
439
#[ lang = "panic_fmt" ]
454
440
#[ no_mangle]
441
+ #[ allow( private_no_mangle_fns) ]
455
442
extern "C" fn panic_fmt ( ) { }
0 commit comments