diff --git a/src/lib.rs b/src/lib.rs index 51e4811a83bdf..19fed28de264b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ #![cfg_attr(feature = "rustc-dep-of-std", no_core)] #![cfg_attr( any(feature = "rustc-dep-of-std", target_os = "redox"), - feature(static_nobundle) + feature(static_nobundle, native_link_modifiers, native_link_modifiers_bundle) )] #![cfg_attr(libc_const_extern_fn, feature(const_extern_fn))] diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 3ac1669b9a882..5ff2294e797c3 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -305,21 +305,21 @@ cfg_if! { } else if #[cfg(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc"), feature = "rustc-dep-of-std"))] { - #[link(name = "util", kind = "static-nobundle", + #[link(name = "util", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "rt", kind = "static-nobundle", + #[link(name = "rt", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "pthread", kind = "static-nobundle", + #[link(name = "pthread", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "m", kind = "static-nobundle", + #[link(name = "m", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "dl", kind = "static-nobundle", + #[link(name = "dl", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "c", kind = "static-nobundle", + #[link(name = "c", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "gcc_eh", kind = "static-nobundle", + #[link(name = "gcc_eh", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] - #[link(name = "gcc", kind = "static-nobundle", + #[link(name = "gcc", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))] #[link(name = "util", cfg(not(target_feature = "crt-static")))] #[link(name = "rt", cfg(not(target_feature = "crt-static")))] @@ -330,7 +330,7 @@ cfg_if! { extern {} } else if #[cfg(target_env = "musl")] { #[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", kind = "static", + link(name = "c", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static")))] #[cfg_attr(feature = "rustc-dep-of-std", link(name = "c", cfg(not(target_feature = "crt-static"))))] @@ -372,7 +372,7 @@ cfg_if! { extern {} } else if #[cfg(target_os = "redox")] { #[cfg_attr(feature = "rustc-dep-of-std", - link(name = "c", kind = "static-nobundle", + link(name = "c", kind = "static", modifiers = "-bundle", 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 7d49450d0925d..f66550b20dfe1 100644 --- a/src/wasi.rs +++ b/src/wasi.rs @@ -361,7 +361,12 @@ pub static CLOCK_THREAD_CPUTIME_ID: clockid_t = #[cfg_attr( feature = "rustc-dep-of-std", - link(name = "c", kind = "static", cfg(target_feature = "crt-static")) + link( + name = "c", + kind = "static", + modifiers = "-bundle", + cfg(target_feature = "crt-static") + ) )] #[cfg_attr( feature = "rustc-dep-of-std",