Skip to content
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

Current libc integration is a huge hack #42773

Closed
est31 opened this issue Jun 20, 2017 · 5 comments
Closed

Current libc integration is a huge hack #42773

est31 opened this issue Jun 20, 2017 · 5 comments
Labels
T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@est31
Copy link
Member

est31 commented Jun 20, 2017

Currently, the integration of the libc crate is very very hacky.

  1. Its integrated as git submodule, and not as cargo dependency.
  2. It is used via a shim (src/rustc/libc_shim) for the sole purpose of passing a cfg flag stdbuild to the crate.

I propose we revive the rustbuild feature that has been removed by #42495 and:

  1. Use libc from crates.io, without a shim, and removing the submodule
  2. Either use cargo features, or revive the rustbuild cfg flag removed by Bump to 1.20.0 and update stage0 compiler #42495 and use it instead of stdbuild
@kennytm
Copy link
Member

kennytm commented Jun 20, 2017

Is the rustc_private feature introduced by #41847 sufficient to replace the rustbuild/stdbuild feature?

@Mark-Simulacrum Mark-Simulacrum added A-build T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jun 20, 2017
@est31
Copy link
Member Author

est31 commented Jun 20, 2017

Is the rustc_private feature introduced by #41847 sufficient to replace the rustbuild/stdbuild feature?

No its only a feature, it can't be used for conditional compilation. The libc crate needs actual conditional compilation (we can remove those last 3 lines probably, but not the 3 I marked).

@kennytm
Copy link
Member

kennytm commented Jun 20, 2017

@est31 Ah right. Sorry. What about cfg(any(stage0, stage1, stage2))? 😄

(BTW is this piece of code in src/bootstrap/bin/rustdoc.rs just an oversight from #42495?)

@est31
Copy link
Member Author

est31 commented Jun 20, 2017

What about cfg(any(stage0, stage1, stage2))?

Lol, lets not do that.

(BTW is this piece of code in src/bootstrap/bin/rustdoc.rs just an oversight from #42495?)

I think so, yes. Be welcome to file a PR I guess :)

@est31
Copy link
Member Author

est31 commented Jun 20, 2017

Okay I'll close this per discussion with @alexcrichton on IRC -- currently there seems no better way to solve this, due to dependencies on libcore/libstd.

@est31 est31 closed this as completed Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants