Commit bcf6db4 1 parent 6a1a079 commit bcf6db4 Copy full SHA for bcf6db4
File tree 1 file changed +4
-1
lines changed
rust_kernel_libs/ffi_bindings/src
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
- #![ no_std]
1
+ #![ cfg_attr ( target_os = "axle_kernel" , no_std) ]
2
2
#![ feature( format_args_nl) ]
3
3
#![ feature( core_intrinsics) ]
4
4
#![ feature( panic_info_message) ]
@@ -95,6 +95,7 @@ macro_rules! internal_println {
95
95
} )
96
96
}
97
97
98
+ #[ cfg( target_os = "axle_kernel" ) ]
98
99
#[ panic_handler]
99
100
pub fn panic ( panic_info : & PanicInfo < ' _ > ) -> ! {
100
101
let msg = match panic_info. message ( ) {
@@ -125,6 +126,7 @@ pub fn panic(panic_info: &PanicInfo<'_>) -> ! {
125
126
126
127
pub struct Dummy ;
127
128
129
+ #[ cfg( target_os = "axle_kernel" ) ]
128
130
unsafe impl GlobalAlloc for Dummy {
129
131
unsafe fn alloc ( & self , layout : Layout ) -> * mut u8 {
130
132
kmalloc ( layout. size ( ) ) as * mut u8
@@ -134,6 +136,7 @@ unsafe impl GlobalAlloc for Dummy {
134
136
}
135
137
}
136
138
139
+ #[ cfg( target_os = "axle_kernel" ) ]
137
140
#[ global_allocator]
138
141
pub static ALLOCATOR : Dummy = Dummy ;
139
142
You can’t perform that action at this time.
0 commit comments