Skip to content

Conversation

dpaoliello
Copy link
Contributor

find-msvc-tools was factored out from cc to allow updating the use in rustc_codegen_ssa (finding the linker when running the Rust compiler) and rustc_windows_rc (finding the Windows Resource Compiler when running the Rust compiler) to be separate from the use in rustc_llvm (building LLVM as part of building the Rust compiler).

@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

The list of allowed third-party dependencies may have been modified! You must ensure that any new dependencies have compatible licenses before merging.

cc @davidtwco, @wesleywiser

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 19, 2025
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 19, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Sep 19, 2025

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@jieyouxu
Copy link
Member

r? @wesleywiser (since you have more context)

@rustbot rustbot assigned wesleywiser and unassigned nnethercote Sep 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 20, 2025

wesleywiser is currently at their maximum review capacity.
They may take a while to respond.

Copy link
Contributor

@nnethercote nnethercote left a comment

Choose a reason for hiding this comment

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

Seems like a nice simplification, but I'll let Wesley have the final say because he knows much more about Windows stuff than I do.

View changes since this review

# `cc` updates often break things, so we pin it here. Cargo enforces "max 1 semver-compat version
# per crate", so if you change this, you need to also change it in `rustc_llvm` and `rustc_codegen_ssa`.
cc = "=1.2.16"
find-msvc-tools = "0.1.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that some other crates use workspace dependencies, but I'm not sure if there are reasons why the compiler shouldn't use them. Would it make sense to set a single version in the workspace and update these two crates to use it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I tried introducing workspace dependencies to the rust repo recently, and then soon after removed them in because they were causing problems. See #146113.

@wesleywiser
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 22, 2025

📌 Commit 4da5935 has been approved by wesleywiser

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 22, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Sep 23, 2025
[win] Use find-msvc-tools instead of cc to find the linker and rc on Windows

`find-msvc-tools` was factored out from `cc` to allow updating the use in `rustc_codegen_ssa` (finding the linker when running the Rust compiler) and `rustc_windows_rc` (finding the Windows Resource Compiler when running the Rust compiler) to be separate from the use in `rustc_llvm` (building LLVM as part of building the Rust compiler).
bors added a commit that referenced this pull request Sep 23, 2025
Rollup of 13 pull requests

Successful merges:

 - #146632 (Fix uses of "adaptor")
 - #146731 (test: Use SVG for terminal url test)
 - #146775 (fixes for numerous clippy warnings)
 - #146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows)
 - #146799 (Fix a dangling reference in `rustc_thread_pool`)
 - #146802 (mbe: Simplifications and refactoring)
 - #146806 (add private module override re-export test)
 - #146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly))
 - #146875 (tests/run-make/crate-loading: Rename source files for clarity)
 - #146896 (rustc-dev-guide subtree update)
 - #146898 (Update books)
 - #146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered)
 - #146907 (add regression test for issue 146537)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Sep 23, 2025
Rollup of 10 pull requests

Successful merges:

 - #146632 (Fix uses of "adaptor")
 - #146731 (test: Use SVG for terminal url test)
 - #146775 (fixes for numerous clippy warnings)
 - #146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows)
 - #146799 (Fix a dangling reference in `rustc_thread_pool`)
 - #146802 (mbe: Simplifications and refactoring)
 - #146806 (add private module override re-export test)
 - #146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly))
 - #146875 (tests/run-make/crate-loading: Rename source files for clarity)
 - #146877 (prevent line number from being copied in chrome)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8f11c4d into rust-lang:master Sep 23, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Sep 23, 2025
rust-timer added a commit that referenced this pull request Sep 23, 2025
Rollup merge of #146784 - dpaoliello:findmsvc, r=wesleywiser

[win] Use find-msvc-tools instead of cc to find the linker and rc on Windows

`find-msvc-tools` was factored out from `cc` to allow updating the use in `rustc_codegen_ssa` (finding the linker when running the Rust compiler) and `rustc_windows_rc` (finding the Windows Resource Compiler when running the Rust compiler) to be separate from the use in `rustc_llvm` (building LLVM as part of building the Rust compiler).
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
[win] Use find-msvc-tools instead of cc to find the linker and rc on Windows

`find-msvc-tools` was factored out from `cc` to allow updating the use in `rustc_codegen_ssa` (finding the linker when running the Rust compiler) and `rustc_windows_rc` (finding the Windows Resource Compiler when running the Rust compiler) to be separate from the use in `rustc_llvm` (building LLVM as part of building the Rust compiler).
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#146632 (Fix uses of "adaptor")
 - rust-lang#146731 (test: Use SVG for terminal url test)
 - rust-lang#146775 (fixes for numerous clippy warnings)
 - rust-lang#146784 ([win] Use find-msvc-tools instead of cc to find the linker and rc on Windows)
 - rust-lang#146799 (Fix a dangling reference in `rustc_thread_pool`)
 - rust-lang#146802 (mbe: Simplifications and refactoring)
 - rust-lang#146806 (add private module override re-export test)
 - rust-lang#146827 (Linker-plugin-based LTO: update list of good combinations (inc. beta + nightly))
 - rust-lang#146875 (tests/run-make/crate-loading: Rename source files for clarity)
 - rust-lang#146877 (prevent line number from being copied in chrome)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-tidy Area: The tidy tool S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants