Skip to content

Commit

Permalink
Auto merge of #2848 - Bryanskiy:android-crt-static, r=Amanieu
Browse files Browse the repository at this point in the history
add crt-static for android
  • Loading branch information
bors committed Jul 30, 2022
2 parents 4bfd852 + 64d47e8 commit 09afbfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/lib.rs
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)
)]
#![cfg_attr(libc_const_extern_fn_unstable, feature(const_extern_fn))]

#[macro_use]
Expand Down
9 changes: 8 additions & 1 deletion src/unix/mod.rs
Expand Up @@ -346,10 +346,17 @@ 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",
target_os = "android",
target_os = "openbsd"))] {
#[link(name = "c")]
#[link(name = "m")]
Expand Down

0 comments on commit 09afbfb

Please sign in to comment.