Skip to content
Merged
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
4 changes: 0 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
#![deny(missing_copy_implementations, safe_packed_borrows)]
#![cfg_attr(not(feature = "rustc-dep-of-std"), no_std)]
#![cfg_attr(feature = "rustc-dep-of-std", no_core)]
#![cfg_attr(
feature = "rustc-dep-of-std",
feature(native_link_modifiers, native_link_modifiers_bundle)
)]
Comment on lines -29 to -32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why this change is necessary?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

native_link_modifiers and native_link_modifiers_bundle are already stable, so these features produce #[warn(stable_features)] in rustc-dep-of-std mode (which turns into an error when building standard library in rust-lang/rust).

#![cfg_attr(libc_const_extern_fn_unstable, feature(const_extern_fn))]

#[macro_use]
Expand Down
8 changes: 8 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,14 @@ cfg_if! {
} else if #[cfg(target_os = "emscripten")] {
#[link(name = "c")]
extern {}
} else if #[cfg(all(target_os = "android", feature = "rustc-dep-of-std"))] {
#[link(name = "c", kind = "static", modifiers = "-bundle",
cfg(target_feature = "crt-static"))]
#[link(name = "m", kind = "static", modifiers = "-bundle",
cfg(target_feature = "crt-static"))]
#[link(name = "m", cfg(not(target_feature = "crt-static")))]
#[link(name = "c", cfg(not(target_feature = "crt-static")))]
extern {}
} else if #[cfg(any(target_os = "macos",
target_os = "ios",
target_os = "watchos",
Expand Down