From 62d3f4bd93c425b263bd9b762632f4601e0ec1c5 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 10 May 2017 21:38:40 -0600 Subject: [PATCH] Add Xargo support --- Xargo.toml | 3 +++ src/panic.rs | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 Xargo.toml diff --git a/Xargo.toml b/Xargo.toml new file mode 100644 index 0000000..bc268c0 --- /dev/null +++ b/Xargo.toml @@ -0,0 +1,3 @@ +[dependencies.alloc] + +[dependencies.collections] diff --git a/src/panic.rs b/src/panic.rs index 27d361d..8ec88a8 100644 --- a/src/panic.rs +++ b/src/panic.rs @@ -4,12 +4,13 @@ use interrupt; #[cfg(not(test))] #[lang = "eh_personality"] -extern "C" fn eh_personality() {} +pub extern "C" fn eh_personality() {} #[cfg(not(test))] /// Required to handle panics #[lang = "panic_fmt"] -extern "C" fn panic_fmt(fmt: ::core::fmt::Arguments, file: &str, line: u32) -> ! { +#[no_mangle] +pub extern "C" fn rust_begin_unwind(fmt: ::core::fmt::Arguments, file: &str, line: u32) -> ! { println!("PANIC: {}", fmt); println!("FILE: {}", file); println!("LINE: {}", line);