Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rustc: Prefer loading crates in the sysroot
This commit is a random stab in the dark to fix the spurious failures on #39518. The leading theory of the spurious failures on Windows is that the compiler is loading a path in the `deps` folder, passing it to `link.exe`, and then this is racing with Cargo itself updating those paths. This race, however, has a few unique properties: * It's isolated to just libstd. Most crates are never passed to the linker and simultaneously being worked on by Cargo. Cargo's typical execution of the dependency graph never hits this problem. * The crates are already all located in the sysroot in addition to the `deps` folder. This means that the compiler actually has two candidates of crates to load, and it's just arbitrarily rejecting one. Together this means that we shouldn't need to fix this problem "in the large" and we can instead just fix it in this isolated situation (hopefully). To solve this the compiler's been updated to prefer crates from the sysroot to leave Cargo's structure to itself. We'll see if this actually allows the PR to land...
- Loading branch information