-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Update cc-rs to 1.0.73 for compiler + bootstrap #99477
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
r? @wesleywiser to make a call on whether this merits a T-compiler(?) FCP given the possible breakage, and in general since I'm not really clear on what the implications of such a change are. |
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.
I think there are basically two cases here:
- rustc is invoked inside of a Developer Command Prompt for VS environment
- rustc is invoked in any other console/environment
From what I've seen, scenario 2 is the more common one and that isn't affected by the bug fix. In scenario 1, it's completely unexpected that we would use a different version of link.exe
than the one in the Developer Command Prompt environment so while it is possible this could change which linker is invoked, that seems unlikely in practice and the new behavior aligns much more closely with what users would expect.
Since this is technically a user-facing change, I think we should FCP it. SummaryThis PR updates cc-rs to a newer version which contains a bug fix that causes the code which locates the msvc linker to now respect some environment variables set by As a result, there is the small potential for a user-facing change if a user was running rustc inside a VS Developer Command Prompt but we had found a different (probably newer) version of the linker than the one that is normally used in that environment. I think the likelihood of this actually breaking someone is small and outweighed by the benefits of making rustc use the expected linker within the VS Developer Command Prompt environment. @rfcbot merge |
Team member @wesleywiser has proposed to merge this. The next step is review by the rest of the tagged team members:
No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
It might be good to land this earlier in a release cycle so that we have the maximum amount of time to detect any unexpected fallout from this (as I said above, I think this is the correct thing to do and there isn't likely to be a negative impact here, but better safe than sorry). @cjgillot @estebank @nikomatsakis @pnkfelix please let me know if you have questions/concerns we should address. Thanks! |
But it already 1.0.73, it was bumped in #100117 ? |
Thanks for heads up @klensy! It's unfortunate this already landed in such a nondescript PR but consensus looks to be that everyone is ok with it. @rfcbot cancel @dpaoliello If you think we should still update the |
@wesleywiser proposal cancelled. |
@wesleywiser #100117 only updates bootstrap - it doesn't change how rustc discovers the environment. As such, we know have an inconsistency: when building Rust, bootstrap will be aware of the ambient VS Command Prompt (and be able to use VS 2022), but the rustc it generates and uses will not be aware of these... |
Nope, not bootstrap (title says bootstrap, but actually it isn't): Lines 520 to 527 in 0068b8b
Lines 82 to 86 in 0068b8b
|
Huh, I don't understand how this works then: if the lock file is moved to a later version, but the toml files weren't changed... |
IIRC this is one of the big differences between NPM style version constraints and Rust/Cargo ones. In NPM, This means the version of |
WARNING: This may be considered a breaking change due to rust-lang/cc-rs@8858713 - specifically,
cc-rs
now correctly detects that it's running in a Visual Studio Command Prompt and will use the ambientLIB
path rather than trying to auto-detect it.Other improvements that may be valuable for the Rust Compiler: