arm-musl targets now use cfg(env = "musl")

This commit is contained in:
Jorge Aparicio 2016-07-26 16:17:14 -05:00
parent f7247d1071
commit 9ffd0fe5a7
8 changed files with 9 additions and 17 deletions

2
.gitmodules vendored
View File

@ -16,4 +16,4 @@
url = https://github.com/rust-lang/rust-installer.git
[submodule "src/liblibc"]
path = src/liblibc
url = https://github.com/rust-lang/libc.git
url = https://github.com/japaric/libc.git

View File

@ -36,9 +36,7 @@ use libc::{c_int, c_void, size_t};
#[cfg_attr(target_os = "android", link(name = "gcc"))]
#[cfg_attr(all(not(windows),
not(target_os = "android"),
not(target_env = "musl"),
not(target_env = "musleabi"),
not(target_env = "musleabihf")),
not(target_env = "musl")),
link(name = "pthread"))]
#[cfg(not(cargobuild))]
extern "C" {}

@ -1 +1 @@
Subproject commit b0d62534d48b711c8978d1bbe8cca0558ae7b1cb
Subproject commit 23a5092adcecc8c755e7887337e52f357353cad7

View File

@ -26,7 +26,7 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
target_env: "musleabi".to_string(),
target_env: "musl".to_string(),
target_vendor: "unknown".to_string(),
options: base,
}

View File

@ -26,7 +26,7 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
target_env: "musleabi".to_string(),
target_env: "musl".to_string(),
target_vendor: "unknown".to_string(),
options: base,
}

View File

@ -27,7 +27,7 @@ pub fn target() -> Target {
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
target_env: "musleabi".to_string(),
target_env: "musl".to_string(),
target_vendor: "unknown".to_string(),
options: base,
}

View File

@ -19,9 +19,7 @@
//
// On Linux, librt and libdl are indirect dependencies via std,
// and binutils 2.22+ won't add them automatically
#[cfg(all(target_os = "linux", not(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))))]
#[cfg(all(target_os = "linux", not(any(target_env = "musl"))))]
#[link(name = "dl")]
#[link(name = "pthread")]
extern {}

View File

@ -171,9 +171,7 @@ impl Drop for Thread {
}
}
#[cfg(all(not(all(target_os = "linux", not(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf")))),
#[cfg(all(not(all(target_os = "linux", not(any(target_env = "musl")))),
not(target_os = "freebsd"),
not(target_os = "macos"),
not(target_os = "bitrig"),
@ -187,9 +185,7 @@ pub mod guard {
}
#[cfg(any(all(target_os = "linux", not(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))),
#[cfg(any(all(target_os = "linux", not(any(target_env = "musl"))),
target_os = "freebsd",
target_os = "macos",
target_os = "bitrig",