[win] Search the Windows SDK for tools as well#1553
Merged
NobodyXu merged 1 commit intorust-lang:mainfrom Sep 16, 2025
Merged
Conversation
NobodyXu
reviewed
Sep 10, 2025
find-msvc-tools/src/find_tools.rs
Outdated
Comment on lines
+1004
to
+1005
| .next() | ||
| .or_else(|| Some((sdk_info.find_tool(tool)?, None))) | ||
| .map(|(tool_path, host)| { |
Contributor
There was a problem hiding this comment.
Suggested change
| .next() | |
| .or_else(|| Some((sdk_info.find_tool(tool)?, None))) | |
| .map(|(tool_path, host)| { | |
| .chain(iter::once(|| Some((sdk_info.find_tool(tool)?, None)))) | |
| .find_map(|(tool_path, host)| { |
Contributor
Author
There was a problem hiding this comment.
clippy prefers map + next, so following that recommendation.
05ff2ab to
40cfad2
Compare
NobodyXu
reviewed
Sep 11, 2025
40cfad2 to
7f635ab
Compare
Contributor
Author
|
If you create a release for |
Contributor
|
Unfortunately our release pipeline would create release for cc and find-msvc-tools It is scheduled to run on this Friday, so if you want it befre Friday, I can cut an early release of find-msvc-tools and cc for you |
Contributor
Author
|
Friday is fine: I'm in no rush |
This was referenced Sep 18, 2025
Merged
Contributor
|
@dpaoliello new release is cut! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Rust Compiler needs to find
rc.exefrom the Windows SDK, which it does by finding the linker, then searching through thePATHenv var to see ifrc.exeexists anywhere there:https://github.com/rust-lang/rust/blob/364da5d88d772fa40fb20353443595385443ac25/compiler/rustc_windows_rc/src/lib.rs#L141-L158
Instead, we can have
find-msvc-toolssearch the Windows SDK paths for tools if that tool is not found in the VC path.