Closed
Description
Linking may fail when an incompatible installation of MinGW is on the PATH, because rustc ends up running external linker instead of the bundled one.
I keep seeing people running into this problem when using WIndows installer. The solution it to run rustc in a console with stripped-down PATH, but this workaround is very nonobvious. I am afraid this will negatively affect perception of quality of our Windows distribution because many early adopters will have some version of mingw already installed on their machines.
I think the earlier decision to make rustc prefer bundled binaries (#17412) was the correct one. We should un-revert 94f0532, and fix cargo build instead.