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

Allow using Visual Studio target names in find_tool #1335

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

ChrisDenton
Copy link
Member

Make find_tool understand VS arch names. This is admittedly partly motivated by the fact that rustc internally uses the name x86 to refer to either i586 and i686 where the distinction doesn't matter.

I also centralized parsing of the user-provided arch name in one place, rather than being repeated in multiple places. This uncovered a bug in vs15plus_vc_paths where we were testing the wrong target variable due to shadowing. I fixed it and renamed the two variables target_arch and target_dir to be clearer.

@ChrisDenton ChrisDenton force-pushed the x86 branch 2 times, most recently from 7bf8e5b to f6f6413 Compare December 29, 2024 08:59
Also fix a bug in vs15plus_vc_paths due to shadowing of the `target` variable.
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 find one mistake, and another nit code refactoring advice

src/windows/find_tools.rs Outdated Show resolved Hide resolved
src/windows/find_tools.rs Outdated Show resolved Hide resolved
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

@NobodyXu NobodyXu merged commit e758ed1 into rust-lang:main Dec 29, 2024
27 checks passed
@madsmtm madsmtm added bug O-windows Windows targets and toolchains labels Jan 1, 2025
@github-actions github-actions bot mentioned this pull request Jan 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 4, 2025
Bump cc in the compiler

Changelog:

- Regenerate target info ([rust-lang#1342](rust-lang/cc-rs#1342))
- Allow using Visual Studio target names in `find_tool` ([rust-lang#1335](rust-lang/cc-rs#1335))
- Fix `is_flag_supported` on msvc ([rust-lang#1336](rust-lang/cc-rs#1336))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug O-windows Windows targets and toolchains
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants