]> git.lizzy.rs Git - rust.git/blob - src/libstd/rtdeps.rs
Add a few more derivings to AST types
[rust.git] / src / libstd / rtdeps.rs
1 // Copyright 2013 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 //! This module contains the linkage attributes to all runtime dependencies of
12 //! the standard library This varies per-platform, but these libraries are
13 //! necessary for running libstd.
14
15 #![experimental]
16
17 // All platforms need to link to rustrt
18 #[link(name = "rust_builtin", kind = "static")]
19 extern {}
20
21 // LLVM implements the `frem` instruction as a call to `fmod`, which lives in
22 // libm. Hence, we must explicitly link to it.
23 //
24 // On linux librt and libdl are indirect dependencies via rustrt,
25 // and binutils 2.22+ won't add them automatically
26 #[cfg(target_os = "linux")]
27 #[link(name = "dl")]
28 #[link(name = "pthread")]
29 extern {}
30
31 #[cfg(target_os = "android")]
32 #[link(name = "dl")]
33 #[link(name = "log")]
34 extern {}
35
36 #[cfg(target_os = "freebsd")]
37 #[link(name = "execinfo")]
38 #[link(name = "pthread")]
39 extern {}
40
41 #[cfg(target_os = "macos")]
42 #[link(name = "System")]
43 extern {}
44
45 #[cfg(target_os = "ios")]
46 #[link(name = "System")]
47 extern {}