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

This commit is contained in:
Jorge Aparicio 2016-07-26 16:13:03 -05:00
parent 09261133a0
commit 23a5092adc
3 changed files with 8 additions and 26 deletions

View File

@ -55,9 +55,7 @@ s! {
pub ru_nvcsw: c_long, pub ru_nvcsw: c_long,
pub ru_nivcsw: c_long, pub ru_nivcsw: c_long,
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
__reserved: [c_long; 16], __reserved: [c_long; 16],
} }
@ -199,9 +197,7 @@ cfg_if! {
} else if #[cfg(all(not(stdbuild), feature = "use_std"))] { } else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
// cargo build, don't pull in anything extra as the libstd dep // cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs. // already pulls in all libs.
} else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips")), } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] {
target_env = "musleabi",
target_env = "musleabihf"))] {
#[link(name = "c", kind = "static")] #[link(name = "c", kind = "static")]
extern {} extern {}
} else if #[cfg(target_os = "emscripten")] { } else if #[cfg(target_os = "emscripten")] {

View File

@ -93,13 +93,9 @@ s! {
} }
pub struct pthread_cond_t { pub struct pthread_cond_t {
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
__align: [*const ::c_void; 0], __align: [*const ::c_void; 0],
#[cfg(not(any(target_env = "musl", #[cfg(not(any(target_env = "musl")))]
target_env = "musleabi",
target_env = "musleabihf")))]
__align: [::c_longlong; 0], __align: [::c_longlong; 0],
size: [u8; __SIZEOF_PTHREAD_COND_T], size: [u8; __SIZEOF_PTHREAD_COND_T],
} }
@ -663,8 +659,6 @@ extern {
cfg_if! { cfg_if! {
if #[cfg(any(target_env = "musl", if #[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf",
target_os = "emscripten"))] { target_os = "emscripten"))] {
mod musl; mod musl;
pub use self::musl::*; pub use self::musl::*;

View File

@ -100,21 +100,13 @@ s! {
pub struct sched_param { pub struct sched_param {
pub sched_priority: ::c_int, pub sched_priority: ::c_int,
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_low_priority: ::c_int, pub sched_ss_low_priority: ::c_int,
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_repl_period: ::timespec, pub sched_ss_repl_period: ::timespec,
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_init_budget: ::timespec, pub sched_ss_init_budget: ::timespec,
#[cfg(any(target_env = "musl", #[cfg(any(target_env = "musl"))]
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_max_repl: ::c_int, pub sched_ss_max_repl: ::c_int,
} }