From c6ea4438927c5ceca2a101f3900f8ffa858d5b39 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 19 Apr 2019 11:04:48 -0600 Subject: [PATCH 1/2] Support crt-static in Redox --- src/redox/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/redox/mod.rs b/src/redox/mod.rs index ac0ae00bce10d..cedf42be201c4 100644 --- a/src/redox/mod.rs +++ b/src/redox/mod.rs @@ -377,8 +377,12 @@ extern { -> ::ssize_t; } -#[link(name = "c")] -#[link(name = "m")] + +#[cfg_attr(feature = "rustc-dep-of-std", + link(name = "c", kind = "static", + cfg(target_feature = "crt-static")))] +#[cfg_attr(feature = "rustc-dep-of-std", + link(name = "c", cfg(not(target_feature = "crt-static"))))] extern {} pub use self::net::*; From 319b7b5b4c5a7d02269c79d14e139b1eefae677e Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 19 Apr 2019 11:57:52 -0600 Subject: [PATCH 2/2] Fix style issue --- src/redox/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/redox/mod.rs b/src/redox/mod.rs index cedf42be201c4..0d2cacc27b2ec 100644 --- a/src/redox/mod.rs +++ b/src/redox/mod.rs @@ -377,7 +377,6 @@ extern { -> ::ssize_t; } - #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", kind = "static", cfg(target_feature = "crt-static")))]