]> git.lizzy.rs Git - rust.git/blob - src/libstd/rtdeps.rs
core: Fix size_hint for signed integer Range<T> iterators
[rust.git] / src / libstd / rtdeps.rs
1 // Copyright 2013-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 //! 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 #![unstable(feature = "std_misc")]
16
17 // All platforms need to link to rustrt
18 #[cfg(not(test))]
19 #[link(name = "rust_builtin", kind = "static")]
20 extern {}
21
22 // LLVM implements the `frem` instruction as a call to `fmod`, which lives in
23 // libm. Hence, we must explicitly link to it.
24 //
25 // On Linux, librt and libdl are indirect dependencies via std,
26 // and binutils 2.22+ won't add them automatically
27 #[cfg(target_os = "linux")]
28 #[link(name = "dl")]
29 #[link(name = "pthread")]
30 extern {}
31
32 #[cfg(target_os = "android")]
33 #[link(name = "dl")]
34 #[link(name = "log")]
35 extern {}
36
37 #[cfg(target_os = "freebsd")]
38 #[link(name = "execinfo")]
39 #[link(name = "pthread")]
40 extern {}
41
42 #[cfg(any(target_os = "dragonfly",
43           target_os = "bitrig",
44           target_os = "openbsd"))]
45 #[link(name = "pthread")]
46 extern {}
47
48 #[cfg(target_os = "macos")]
49 #[link(name = "System")]
50 extern {}
51
52 #[cfg(target_os = "ios")]
53 #[link(name = "System")]
54 extern {}