Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Should rustc-dep-of-std feature really depend on c? #288

Closed
RalfJung opened this issue May 13, 2019 · 3 comments · Fixed by #289
Closed

Should rustc-dep-of-std feature really depend on c? #288

RalfJung opened this issue May 13, 2019 · 3 comments · Fixed by #289

Comments

@RalfJung
Copy link
Member

It used to be possible to almost entirely build libstd for some target without having a C toolchain (the "almost" being due to rust-lang/rust#56443: in the final step, a dylib gets built). To do this, we have to be careful to not enable the c feature of compiler-builtins. This could be achieved by disabling the default features of libstd.
However, that regressed when compiler-builtins got moved out of the workspace; now liballoc depends on the rustc-dep-of-std feature (curiously, libstd does not), and that feature depends on the c feature.

Is it really necessary that the rustc-dep-of-std feature depends on c?

@alexcrichton
Copy link
Member

It isn't, just needs to be enabled somehow and that can be done with a feature of std instead of an implicit feature enabled by rustc-dep-of-std

@RalfJung
Copy link
Member Author

libstd enables it per default.

So, does that mean we can remove it from rustc-dep-of-std?

@alexcrichton
Copy link
Member

So long as libstd builds and uses the c feature for released builds I don't have a personal preference how this is all architected.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants