]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/lang-item-public.rs
Imported Upstream version 1.2.0+dfsg1
[rustc.git] / src / test / run-pass / lang-item-public.rs
1 // Copyright 2014-2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // aux-build:lang-item-public.rs
12 // ignore-android
13
14 #![feature(lang_items, start, no_std)]
15 #![no_std]
16
17 extern crate lang_item_public as lang_lib;
18
19 #[cfg(target_os = "linux")]
20 #[link(name = "c")]
21 extern {}
22
23 #[cfg(target_os = "android")]
24 #[link(name = "c")]
25 extern {}
26
27 #[cfg(target_os = "freebsd")]
28 #[link(name = "execinfo")]
29 extern {}
30
31 #[cfg(target_os = "freebsd")]
32 #[link(name = "c")]
33 extern {}
34
35 #[cfg(target_os = "dragonfly")]
36 #[link(name = "c")]
37 extern {}
38
39 #[cfg(any(target_os = "bitrig", target_os = "openbsd"))]
40 #[link(name = "c")]
41 extern {}
42
43 #[cfg(target_os = "macos")]
44 #[link(name = "System")]
45 extern {}
46
47 #[start]
48 fn main(_: isize, _: *const *const u8) -> isize {
49 1_isize % 1_isize
50 }