Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon. Please see the contribution instructions for more information. |
JohnTitor
left a comment
There was a problem hiding this comment.
Also, it'd be helpful to provide the context/reason for this change.
| #![cfg_attr( | ||
| feature = "rustc-dep-of-std", | ||
| feature(native_link_modifiers, native_link_modifiers_bundle) | ||
| )] |
There was a problem hiding this comment.
Could you explain why this change is necessary?
There was a problem hiding this comment.
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).
This is the libc part of supporting statically linked executables on Android, the rustc part is rust-lang/rust#99421. |
|
@bors r+ |
|
💔 Test failed - checks-actions |
|
| } else if #[cfg(any(target_os = "macos", | ||
| target_os = "ios", | ||
| target_os = "watchos", | ||
| target_os = "android", |
There was a problem hiding this comment.
With these changes as is the case of Android without rustc-dep-of-std is never covered, so this line needs to be kept.
Sorry, didn't notice this previously.
|
Does anybody know why libc on musl and redox doesn't link anything at all in regular no-std mode (without |
|
Implementation for glibc is also incorrect, but in a different way - in regular no-std mode the libraries are linked dynamically even if |
|
Ah, I see, all of this is indeed incorrect but cannot be properly fixed on stable version of libc because link time Anyway, this PR is about Android and the least bad thing to do for this target would be to follow what glibc does (i.e. #2848 (comment)). |
|
@bors r+ |
|
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
|
@Amanieu |
No description provided.