(index<- ) ./libstd/rtdeps.rs
git branch: * master 5200215 auto merge of #14035 : alexcrichton/rust/experimental, r=huonw
modified: Wed Apr 9 17:27:03 2014
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 // All platforms need to link to rustrt
16 #[link(name = "rustrt", kind = "static")]
17 extern {}
18
19 // LLVM implements the `frem` instruction as a call to `fmod`, which lives in
20 // libm. Hence, we must explicitly link to it.
21 //
22 // On linux librt and libdl are indirect dependencies via rustrt,
23 // and binutils 2.22+ won't add them automatically
24 #[cfg(target_os = "linux")]
25 #[link(name = "dl")]
26 #[link(name = "pthread")]
27 extern {}
28
29 #[cfg(target_os = "android")]
30 #[link(name = "dl")]
31 #[link(name = "log")]
32 extern {}
33
34 #[cfg(target_os = "freebsd")]
35 #[link(name = "execinfo")]
36 #[link(name = "pthread")]
37 extern {}
38
39 #[cfg(target_os = "macos")]
40 #[link(name = "System")]
41 extern {}