-
Notifications
You must be signed in to change notification settings - Fork 270
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
Tidy up beneath-std, support Windows-MSVC without libc #450
Conversation
On Unix a dependency on libc is still necessary for crt1.o. As is libunwind for any panic=unwind target (even when compiling with panic=abort, as libcore references it _Unwind_Resume from libunwind) |
Ah! I'll improve the comments. |
c56312b
to
74df978
Compare
#![feature(panic_unwind)] | ||
extern crate unwind; | ||
|
||
// Pull in the system libc library for what crt0.o likely requires. | ||
#[cfg(not(windows))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect windows-gnu still needs it, but I'm not entirely sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows-gnu includes gnu libc via the compiler. The libc crate doesn't add anything, as far as I'm aware.
src/beneath-std.md
Outdated
with an `extern crate libc;` declaration as shown in the examples below. | ||
with an `extern crate libc;` declaration as shown in the examples below. Note that | ||
windows-msvc targets do not require a libc, and correspondingly there is no `libc` | ||
crate in their sysroot. We not need the `extern crate libc;` below, and having it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crate in their sysroot. We not need the `extern crate libc;` below, and having it | |
crate in their sysroot. We do not need the `extern crate libc;` below, and having it |
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, yeah your fix is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update nomicon Updates the nomicon to pull in rust-lang/nomicon#450 to fix toolstate.
Update nomicon Updates the nomicon to pull in rust-lang/nomicon#450 to fix toolstate.
Update nomicon Updates the nomicon to pull in rust-lang/nomicon#450 to fix toolstate.
I've run into this because my other PR breaks these examples: rust-lang/rust#124050
(also the comment about
crt0.o
on these can't be right, because this was being built on Windows)