aboutsummaryrefslogtreecommitdiff
path: root/tests/no_std_build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/no_std_build.rs')
-rw-r--r--tests/no_std_build.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/no_std_build.rs b/tests/no_std_build.rs
new file mode 100644
index 0000000..bddedc8
--- /dev/null
+++ b/tests/no_std_build.rs
@@ -0,0 +1,13 @@
+#![feature(lang_items, start, libc)]
+#![no_std]
+
+extern crate libc;
+extern crate x86;
+
+#[start]
+fn start(_argc: isize, _argv: *const *const u8) -> isize {
+ 0
+}
+
+#[lang = "eh_personality"] extern fn eh_personality() {}
+#[lang = "panic_fmt"] fn panic_fmt() -> ! { loop {} }