Skip to content

Ensure the library search path from cc_toolchain is preferred over whatever rustc finds in the Windows registry#3608

Merged
illicitonion merged 2 commits intobazelbuild:mainfrom
dgrunwald-qt:fix-3256
Sep 29, 2025
Merged

Ensure the library search path from cc_toolchain is preferred over whatever rustc finds in the Windows registry#3608
illicitonion merged 2 commits intobazelbuild:mainfrom
dgrunwald-qt:fix-3256

Conversation

@dgrunwald-qt
Copy link
Copy Markdown
Contributor

I don't see a good way to stop rustc from adding the non-hermetic library search path, so put our cc_toolchain library search path on the command line where it has precedence over the non-hermetic path injected by rustc.

See https://rust-lang.zulipchat.com/#narrow/channel/242869-t-compiler.2Fwindows/topic/rust.20LIB.20path for discussion of the rustc behavior.

Closes #3256.

Copy link
Copy Markdown
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Seems reasonable! Thanks!

… is preferred over whatever rustc finds in the Windows registry.
@dgrunwald-qt
Copy link
Copy Markdown
Contributor Author

Oops, I forgot to set up the pre-commit hooks. Formatting is fixed now.

@illicitonion illicitonion added this pull request to the merge queue Sep 29, 2025
Merged via the queue into bazelbuild:main with commit 5900faa Sep 29, 2025
3 checks passed
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.

rustc uses non-hermetic libs/paths on Windows

2 participants