-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix setting PATH during linkage on windows-gnu #42481
Conversation
Oh actually I miststated - this is not like previously, now this is only frobbing PATH at all for linker invocation on windows, whereas before it was doing it on all platforms. Again we think it only matters on windows. |
src/librustc_trans/back/link.rs
Outdated
// On windows-gnu (msvc is handled separately), we bundle | ||
// gcc and other tools with the official releases. This is | ||
// how the other tools that gcc itself needs are located. | ||
vec![("PATH".into(), command_path(sess, linker.map(PathBuf::from)))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem right. The second parameter to command_path
is added to the end of %Path%
and before #42225 it was only used by MSVC.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes. I suspected that path had no effect. I'll update.
Ok, now the patch is written so that all non-msvc platforms set up the PATH during linking as previously. The |
@bors: r+ |
📌 Commit e8689c7 has been approved by |
Fix setting PATH during linkage on windows-gnu This makes the behavior almost exactly the same as before the VS2017 patch, except that on MSVC builds the host bin path is no longer added to PATH. I am not sure that's actually necessary on any platform. r? @alexcrichton Fixes #42422
☀️ Test successful - status-appveyor, status-travis |
[beta] Fix setting PATH during linkage on windows-gnu Beta backport of #42481
This makes the behavior almost exactly the same as before the VS2017 patch, except that on MSVC builds the host bin path is no longer added to PATH. I am not sure that's actually necessary on any platform.
r? @alexcrichton
Fixes #42422