-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix error when building rustc with a custom libc #2028
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
Conversation
r? @JohnTitor (rust-highfive has picked a reviewer for you, use r? to override) |
AFAIK this is necessary as mentioned in #1268 and rust-lang/rust#73096 (comment). |
I'm not sure I understand - is I'm sure there are good reasons, but why does
This position requires anyone testing changes to |
Maybe bootstrap step or something would be related but I couldn't find any reference at all.
I should've clarified that we didn't generally. The important thing here is not to break rust-lang/rust. So, if it won't break the build on rust-lang/rust and makes much sense, I'm fine to accept it. |
No the feature is the only special-casing in rust-lang/rust. Cargo squashes warnings from all non-path dependencies, though, so when it's built from crates.io you don't see warnings. If you're using a path dependency or FWIW this seems reasonable, I don't think this generated a warning when it was first implemented, but keeping warnings out is typically nice. |
Ah, this helps my understanding a lot, thank you! I got the impression that passing
Ah totally! I've read back what I wrote and it seems a little combative in hindsight - sorry for 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.
Thanks Alex for pointing it out!
Then I'm happy to r+ this :)
@bors r+ |
📌 Commit 48c4482 has been approved by |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13 |
When pulling a custom
libc
into arustc
build (with therustc-dep-of-std
feature set), the following error occurs:I think this is because both the
no_std
andno_core
attributes are specified, although the error message doesn't make this very clear. This PR changes this sono_std
is only supplied when therustc-dep-of-std
feature is not.