Skip to content

Conversation

ChrisDenton
Copy link
Member

@ChrisDenton ChrisDenton commented Aug 21, 2025

If all other methods fail, this attempts to find the MSVC tools bin path by checking for the existence of the bin subdirectory. As with other code, this picks the highest version from the possible candidates.

Ideally we'd also update the code for the recent Visual Studio changes but that would need more investigation and in any case this fallback will continue to be useful as a hedge against other changes that may break cc-rs.

Fixes #1525

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Just some code change to avoid early terminating the loop and use combinator

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about this

Co-Authored-By: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
@NobodyXu
Copy link
Collaborator

NobodyXu commented Aug 21, 2025

Thank you!

@NobodyXu NobodyXu merged commit 3b6457d into rust-lang:main Aug 21, 2025
77 checks passed
@ChrisDenton ChrisDenton deleted the tooldir-fallback branch August 21, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not find local Visual Studio install on x86_64-pc-windows-msv if C++ x64/x86 Build Tools (Latest) is not installed
2 participants