diff --git a/src/lib.rs b/src/lib.rs index 426b684962489..25ab9cbe37b5d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,7 +19,7 @@ // Attributes needed when building as part of the standard library #![cfg_attr( feature = "rustc-dep-of-std", - feature(cfg_target_vendor, link_cfg, no_core) + feature(cfg_target_vendor, link_cfg, no_core, static_nobundle) )] // Enable extra lints: #![cfg_attr(feature = "extra_traits", deny(missing_debug_implementations))] diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 1be0095343635..7ec8d1dbed6a6 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -308,7 +308,7 @@ cfg_if! { // already pulls in all libs. } else if #[cfg(target_env = "musl")] { #[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", kind = "static", + link(name = "c", kind = "static-nobundle", cfg(target_feature = "crt-static")))] #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", cfg(not(target_feature = "crt-static"))))] diff --git a/src/wasi.rs b/src/wasi.rs index a014e4c0fa330..025d58d839cbb 100644 --- a/src/wasi.rs +++ b/src/wasi.rs @@ -602,7 +602,8 @@ pub const __WASI_WHENCE_SET: u8 = 2; #[cfg_attr( feature = "rustc-dep-of-std", - link(name = "c", kind = "static", cfg(target_feature = "crt-static")) + link(name = "c", kind = "static-nobundle", + cfg(target_feature = "crt-static")) )] #[cfg_attr( feature = "rustc-dep-of-std",