]> git.proxmox.com Git - rustc.git/blame - src/libstd/rtdeps.rs
Imported Upstream version 1.3.0+dfsg1
[rustc.git] / src / libstd / rtdeps.rs
CommitLineData
85aaf69f 1// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT
1a4d82fc
JJ
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
c1a9b12d
SL
15// A few small shims in C that haven't been translated to Rust yet
16#[cfg(all(not(test), not(windows)))]
1a4d82fc
JJ
17#[link(name = "rust_builtin", kind = "static")]
18extern {}
19
20// LLVM implements the `frem` instruction as a call to `fmod`, which lives in
21// libm. Hence, we must explicitly link to it.
22//
23// On Linux, librt and libdl are indirect dependencies via std,
24// and binutils 2.22+ won't add them automatically
d9579d0f 25#[cfg(all(target_os = "linux", not(target_env = "musl")))]
1a4d82fc
JJ
26#[link(name = "dl")]
27#[link(name = "pthread")]
28extern {}
29
30#[cfg(target_os = "android")]
31#[link(name = "dl")]
32#[link(name = "log")]
33extern {}
34
35#[cfg(target_os = "freebsd")]
36#[link(name = "execinfo")]
37#[link(name = "pthread")]
38extern {}
39
c34b1796
AL
40#[cfg(any(target_os = "dragonfly",
41 target_os = "bitrig",
c1a9b12d 42 target_os = "netbsd",
c34b1796 43 target_os = "openbsd"))]
1a4d82fc
JJ
44#[link(name = "pthread")]
45extern {}
46
47#[cfg(target_os = "macos")]
48#[link(name = "System")]
49extern {}
50
51#[cfg(target_os = "ios")]
52#[link(name = "System")]
53extern {}