diff options
author | bors <bors@rust-lang.org> | 2022-08-09 10:25:53 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-08-09 10:25:53 +0000 |
commit | 4b7908f0b174e95d28f151ae31585c0a189c35ce (patch) | |
tree | fc4b7809fe395e9073e4ab93b3ee344b78b34310 | |
parent | 424e7e38ed0cdbc8ca9ef2c621d78ca658b6e38f (diff) | |
parent | d6d7bfdb055f4158fe41a1d5e1ee64de0d31840d (diff) | |
download | rust-libc-4b7908f0b174e95d28f151ae31585c0a189c35ce.tar.gz |
Auto merge of #2848 - Bryanskiy:android-crt-static, r=Amanieu
add crt-static for android
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/unix/mod.rs | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib.rs b/src/lib.rs index 3ad346a429..acda091592 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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) -)] #![cfg_attr(libc_const_extern_fn_unstable, feature(const_extern_fn))] #[macro_use] diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 1d57f28b21..ecc693e3db 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -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", |