]> git.lizzy.rs Git - rust.git/blob - src/libstd/rtdeps.rs
Add support for the Haiku operating system on x86 and x86_64 machines
[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 #![cfg(not(cargobuild))]
16
17 // LLVM implements the `frem` instruction as a call to `fmod`, which lives in
18 // libm. Hence, we must explicitly link to it.
19 //
20 // On Linux, librt and libdl are indirect dependencies via std,
21 // and binutils 2.22+ won't add them automatically
22 #[cfg(all(target_os = "linux", not(target_env = "musl")))]
23 #[link(name = "dl")]
24 #[link(name = "pthread")]
25 extern {}
26
27 #[cfg(target_os = "android")]
28 #[link(name = "dl")]
29 #[link(name = "log")]
30 extern {}
31
32 #[cfg(target_os = "freebsd")]
33 #[link(name = "execinfo")]
34 #[link(name = "pthread")]
35 extern {}
36
37 #[cfg(any(target_os = "dragonfly",
38           target_os = "bitrig",
39           target_os = "netbsd",
40           target_os = "openbsd"))]
41 #[link(name = "pthread")]
42 extern {}
43
44 #[cfg(target_os = "solaris")]
45 #[link(name = "socket")]
46 #[link(name = "posix4")]
47 #[link(name = "pthread")]
48 extern {}
49
50 // For PNaCl targets, nacl_io is a Pepper wrapper for some IO functions
51 // missing (ie always error) in Newlib.
52 #[cfg(all(target_os = "nacl", not(test)))]
53 #[link(name = "nacl_io", kind = "static")]
54 #[link(name = "c++", kind = "static")] // for `nacl_io` and EH.
55 #[link(name = "pthread", kind = "static")]
56 extern {}
57
58 #[cfg(target_os = "macos")]
59 #[link(name = "System")]
60 extern {}
61
62 #[cfg(target_os = "ios")]
63 #[link(name = "System")]
64 extern {}
65
66 #[cfg(target_os = "haiku")]
67 #[link(name = "network")]
68 extern {}