-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Make stdbuild a cargo feature #764
Conversation
Cargo.toml
Outdated
@@ -18,8 +18,8 @@ travis-ci = { repository = "rust-lang/libc" } | |||
appveyor = { repository = "rust-lang-libs/libc" } | |||
|
|||
[features] | |||
default = ["use_std"] |
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.
This was intentionally set up like this before (enabling std as a feaeture), could this be reverted?
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.
Sure. It's a bit more awkward because this setup allows stdbuild
to depend on no_std
, which can't be done in reverse, that's all.
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.
Done.
This is green now, with the changes you requested. |
Cargo.toml
Outdated
@@ -20,6 +20,7 @@ appveyor = { repository = "rust-lang-libs/libc" } | |||
[features] | |||
default = ["use_std"] | |||
use_std = [] | |||
stdbuild = [] |
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.
Can this be avoided in this Cargo.toml? Ideally this isn't exported as part of the public API
I suppose, but won't that mean we can never get rid of the shim in rustc?
Anyway, done.
…On Sep 12, 2017 00:11, "Alex Crichton" ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Cargo.toml
<#764 (comment)>:
> @@ -20,6 +20,7 @@ appveyor = { repository = "rust-lang-libs/libc" }
[features]
default = ["use_std"]
use_std = []
+stdbuild = []
Can this be avoided in this Cargo.toml? Ideally this isn't exported as
part of the public API
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#764 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABdsPKuRnmWoqQxh7fleK3FOwVqMOI11ks5shgR2gaJpZM4PT93Q>
.
|
@bors: r+ AFAIK we have no path forward for using the libc crate as-is in rustbuild, we've got a long way to go to enable that. |
📌 Commit 8a7069f has been approved by |
Make stdbuild a cargo feature Also invert the default feature / no std arrangement. The default still uses std, but no_std now requires opt-in instead of opt-out. This is work toward removing the shim in rustc.
☀️ Test successful - status-appveyor, status-travis |
{compiler-builtins,libc} shim cleanup ~~Depends on rust-lang/libc#764; opening early for feedback.~~ r? @alexcrichton
{compiler-builtins,libc} shim cleanup ~~Depends on rust-lang/libc#764; opening early for feedback.~~ r? @alexcrichton
{compiler-builtins,libc} shim cleanup ~~Depends on rust-lang/libc#764; opening early for feedback.~~ r? @alexcrichton
{compiler-builtins,libc} shim cleanup ~~Depends on rust-lang/libc#764; opening early for feedback.~~ r? @alexcrichton
{compiler-builtins,libc} shim cleanup ~~Depends on rust-lang/libc#764; opening early for feedback.~~ r? @alexcrichton
Also invert the default feature / no std arrangement. The default
still uses std, but no_std now requires opt-in instead of opt-out.
This is work toward removing the shim in rustc.