-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Remove libc from MSVC targets #124050
Remove libc from MSVC targets #124050
Conversation
rustbot has assigned @compiler-errors. Use |
☔ The latest upstream changes (presumably #124084) made this pull request unmergeable. Please resolve the merge conflicts. |
e7cb951
to
934f92d
Compare
This comment has been minimized.
This comment has been minimized.
0a688d3
to
45d4e81
Compare
☔ The latest upstream changes (presumably #124072) made this pull request unmergeable. Please resolve the merge conflicts. |
45d4e81
to
fdc9b3d
Compare
@ChrisDenton Is there anything else that needs to be done to remove libc from MSVC targets? I feel like this was almost too easy. |
There's also #123976. Also I found the std_detect crate is pulling in libc even if unused. See std uses the default features "std_detect_file_io", and "std_detect_dlsym_getauxval" rust/library/sysroot/Cargo.toml Line 14 in 0e15f5e
Which in the std-detect crate enables the libc feature which in turn enables the libc dependency: https://github.com/rust-lang/stdarch/blob/7df81ba8c3e2d02c2ace0c5a6f4f32d800c09e56/crates/std_detect/Cargo.toml#L37 However, libc isn't used for those two features on Windows (it is currently used for a third, not default enabled. feature). But I'm not sure how to have a dependency enabled when it's both feature and target specific. |
Rebasing on this PR and excluding libc from std_detect I'm still seeing the following UI test failures:
|
Ah-ha! That makes more sense. |
Now we should be down to
These tests are all pretty unix-y, but I'm going to educate myself a bit and see if there's a way to make a windows equivalent in some cases. |
ab82b85
to
7a95ff7
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #124208) made this pull request unmergeable. Please resolve the merge conflicts. |
88a0da2
to
b135388
Compare
Fix for the nomicon: rust-lang/nomicon#450 |
CI: fix toolstate publishing Toolstate publishing after something broke was not working (discovered [here](rust-lang#124050 (comment))). The toolstate env. vars should only be needed for the publishing step, so I moved them there. The toolstate script is also being checked in `mingw-check` on PR and auto CI, but it doesn't really seem to do anything, and it shouldn't require the token.
☔ The latest upstream changes (presumably #124560) made this pull request unmergeable. Please resolve the merge conflicts. |
5995a60
to
39ef149
Compare
@bors r=ChrisDenton |
…sDenton Remove libc from MSVC targets `@ChrisDenton` started working on a project to remove libc from Windows MSVC targets. I'm completing that work here. The primary change is to cfg out the dependency in `library/`. And then there's a lot of test patching. Happy to separate this more if people want.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#124050 (Remove libc from MSVC targets) - rust-lang#124283 (Note for E0599 if shadowed bindings has the method.) - rust-lang#125123 (Fix `read_exact` and `read_buf_exact` for `&[u8]` and `io:Cursor`) - rust-lang#125158 (hir pretty: fix block indent) - rust-lang#125298 (Add codegen test for array comparision opt) - rust-lang#125332 (Update books) Failed merges: - rust-lang#125310 (Move ~100 tests from tests/ui to subdirs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#124050 (Remove libc from MSVC targets) - rust-lang#124283 (Note for E0599 if shadowed bindings has the method.) - rust-lang#125123 (Fix `read_exact` and `read_buf_exact` for `&[u8]` and `io:Cursor`) - rust-lang#125158 (hir pretty: fix block indent) - rust-lang#125308 (track cycle participants per root) - rust-lang#125332 (Update books) - rust-lang#125333 (switch to the default implementation of `write_vectored`) - rust-lang#125346 (Remove some `Path::to_str` from `rustc_codegen_llvm`) Failed merges: - rust-lang#125310 (Move ~100 tests from tests/ui to subdirs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#124050 - saethlin:less-sysroot-libc, r=ChrisDenton Remove libc from MSVC targets ``@ChrisDenton`` started working on a project to remove libc from Windows MSVC targets. I'm completing that work here. The primary change is to cfg out the dependency in `library/`. And then there's a lot of test patching. Happy to separate this more if people want.
CI: fix toolstate publishing Toolstate publishing after something broke was not working (discovered [here](rust-lang/rust#124050 (comment))). The toolstate env. vars should only be needed for the publishing step, so I moved them there. The toolstate script is also being checked in `mingw-check` on PR and auto CI, but it doesn't really seem to do anything, and it shouldn't require the token.
@ChrisDenton started working on a project to remove libc from Windows MSVC targets. I'm completing that work here.
The primary change is to cfg out the dependency in
library/
. And then there's a lot of test patching. Happy to separate this more if people want.