diff options
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r-- | src/unix/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 0cb3f78dd2..b79bb9f8c5 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -205,7 +205,8 @@ cfg_if! { // cargo build, don't pull in anything extra as the libstd dep // already pulls in all libs. } else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips"))))] { - #[link(name = "c", kind = "static")] + #[link(name = "c", kind = "static", cfg(target_feature = "crt-static"))] + #[link(name = "c", cfg(not(target_feature = "crt-static")))] extern {} } else if #[cfg(target_os = "emscripten")] { #[link(name = "c")] |