Add a dependency on rlibc

This commit is contained in:
Philipp Oppermann
2017-04-11 18:25:51 +02:00
parent ca2ccc31aa
commit 5d8758df59
2 changed files with 9 additions and 1 deletions

View File

@@ -5,3 +5,6 @@ authors = ["Philipp Oppermann <dev@phil-opp.com>"]
[lib]
crate-type = ["staticlib"]
[dependencies]
rlibc = "1.0"

View File

@@ -1,8 +1,13 @@
#![feature(lang_items)]
#![no_std]
extern crate rlibc;
#[no_mangle]
pub extern fn rust_main() {}
pub extern fn rust_main() {
let x = ["Hello", "World", "!"];
let y = x;
}
#[lang = "eh_personality"] extern fn eh_personality() {}
#[lang = "panic_fmt"] #[no_mangle] pub extern fn panic_fmt() -> ! {loop{}}