Skip to content

Don't bundle static libc. #1327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))]
Expand Down
2 changes: 1 addition & 1 deletion src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"))))]
Expand Down
3 changes: 2 additions & 1 deletion src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down