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

fix find_tool and find_vs_version might returns incompatible values #488

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

Speedy37
Copy link
Contributor

On my PC, I have both MSVC 15 and 16 and found out that find_vs_version returns MSVC 16 while find_tool return MSVC 15 linker.

This caused rust to use MSVC 15 linker, while cmake generated file where made with MSVC 16.

@Speedy37
Copy link
Contributor Author

Maybe a better approach to find the latest version would be to implement something like: https://github.com/microsoft/vswhere/blob/f078b21784b53dd811ad72f0334b7b70f22aa9cf/src/vswhere.lib/InstanceSelector.cpp#L34

@alexcrichton
Copy link
Member

Thanks for this! I agree though yeah if we're doing comparisons we should probably do some pattern matching here, because otherwise I think this is doing lexicographical ordering which isn't numerical ordering? (or semver ordering)

On windows, I have both MSVC 15 and 16 and found out that find_vs_version returns MSVC 16 while find_tool returns MSVC 15 linker.
@Speedy37
Copy link
Contributor Author

I now convert installation version to Vec for the ordering.

@alexcrichton alexcrichton merged commit 5bb26a6 into rust-lang:master Apr 22, 2020
@alexcrichton
Copy link
Member

Nice!

Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this pull request May 9, 2020
Pulls in updated MSVC detection logic landed in rust-lang/cc-rs#488
RalfJung pushed a commit to RalfJung/rust that referenced this pull request May 10, 2020
Pulls in updated MSVC detection logic landed in rust-lang/cc-rs#488
RalfJung added a commit to RalfJung/rust that referenced this pull request May 10, 2020
…lacrum

Update the `cc` crate

Pulls in updated MSVC detection logic landed in rust-lang/cc-rs#488
RalfJung added a commit to RalfJung/rust that referenced this pull request May 10, 2020
…lacrum

Update the `cc` crate

Pulls in updated MSVC detection logic landed in rust-lang/cc-rs#488
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.

2 participants