Skip to content

Commit 9e8a270

Browse files
committed
test: Un-ignore smallest-hello-world.rs
Rebased through the ages to bring the test up to date. Closes #8538
1 parent c8f5b70 commit 9e8a270

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

src/test/run-pass/smallest-hello-world.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,21 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// ignore-test - FIXME(#8538) some kind of problem linking induced by extern "C" fns
12-
1311
// Smallest hello world with no runtime
1412

1513
#![no_std]
1614

17-
// This is an unfortunate thing to have to do on linux :(
18-
#[cfg(target_os = "linux")]
19-
#[doc(hidden)]
20-
pub mod linkhack {
21-
#[link_args="-lrustrt -lrt"]
22-
extern {}
23-
}
15+
extern crate libc;
2416

25-
extern {
26-
fn puts(s: *u8);
27-
}
17+
extern { fn puts(s: *u8); }
18+
extern "rust-intrinsic" { fn transmute<T, U>(t: T) -> U; }
2819

29-
extern "rust-intrinsic" {
30-
fn transmute<T, U>(t: T) -> U;
31-
}
20+
#[no_mangle]
21+
pub extern fn rust_stack_exhausted() {}
3222

3323
#[start]
34-
pub fn main(_: int, _: **u8, _: *u8) -> int {
24+
#[no_split_stack]
25+
fn main(_: int, _: **u8) -> int {
3526
unsafe {
3627
let (ptr, _): (*u8, uint) = transmute("Hello!");
3728
puts(ptr);

0 commit comments

Comments
 (0)