+ adding compiler features for no_std environments other than wasm (i.e. SGX) (#2421)

This commit is contained in:
brenzi
2019-05-01 20:09:12 +02:00
committed by Bastian Köcher
parent ef142722e3
commit d3f59a0712
4 changed files with 6 additions and 0 deletions
+2
View File
@@ -22,6 +22,7 @@ use core::{intrinsics, panic::PanicInfo};
use rstd::{vec::Vec, cell::Cell};
use primitives::Blake2Hasher;
#[cfg(not(feature = "no_panic_handler"))]
#[panic_handler]
#[no_mangle]
pub fn panic(info: &PanicInfo) -> ! {
@@ -43,6 +44,7 @@ pub fn panic(info: &PanicInfo) -> ! {
}
}
#[cfg(not(feature = "no_oom"))]
#[alloc_error_handler]
pub extern fn oom(_: ::core::alloc::Layout) -> ! {
static OOM_MSG: &str = "Runtime memory exhausted. Aborting";