-
Notifications
You must be signed in to change notification settings - Fork 466
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
Use RUSTC_WRAPPER if no other wrapper is provided #918
Use RUSTC_WRAPPER if no other wrapper is provided #918
Conversation
Previously, the `rustc_wrapper_fallback` was only called if the tool was **not** a full path. With this patch, the `RUSTC_WRAPPER` is always used, even if the tool provided is an exact path. Providing a wrapper manually is still possible and overrides the `RUSTC_WRAPPER`. If the path to the tool includes spaces it is otherwise impossible to provide a compiler cache like sccache through the CXX or CC environment variables, as the arguments will be split up incorrectly. See also: corrosion-rs/corrosion#474
I'd recommend you to add |
This should suppress new warnings generated by the nightly toolchain.
Hi, thank you. That has fixed the CI issues. Probably just an update in nightly. |
P.S. Looking at the source code, seems like cc actually supports splitting env This is just a rant from me, doesn't affect merging of this PR. |
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.
It would be great if you can setup a new CI that tests using RUSTC_WRAPPER
for tools with relative and absolute pathas you describe, honestly a lot of stuff in cc are untested, so I'd prefer to use this opportunity to add some test for this.
Yes, it does, but only if the path to On windows, our CI finds the path to For this to work correctly, we'd need #847 . You can follow the corrosion in the corrision issue I mentioned, which hits the problem. |
Thanks I see, this is something I didn't realize could happen in production where path includes spaces. |
It would be great if you could verify it works, then I would have the confidence of approving and merging this PR. Edit: Sorry if I sound rude, I just want some confidence it would work as intended (cc has a history of merging PRs later found out to not work as intended and yanked the release, which is why v0.1.84 is yanked). It would be great if you could try this in your project and veirfy that it work as intended. |
Hi, of course. For some reason our Windows CI doesn't gain much speed when running under ctest, which we haven't fully investigated. |
This behavior should also be documented, though considering that none of the environment variable usage is documented, I don't think that should hold up this PR. I opened a new issue for that: #920. |
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.
Thank you!
1.0.85 includes rust-lang/cc-rs#918 and the macOS deployment target issue has been fixed.
1.0.85 includes rust-lang/cc-rs#918 and the macOS deployment target issue has been fixed.
1.0.86 includes rust-lang/cc-rs#918 and the macOS deployment target issue has been fixed.
1.0.86 includes rust-lang/cc-rs#918 and the macOS deployment target issue has been fixed.
1.0.86 includes rust-lang/cc-rs#918 and the macOS deployment target issue has been fixed.
Previously, the
rustc_wrapper_fallback
was only called if the toolwas not a full path.
With this patch, the
RUSTC_WRAPPER
is always used, even if the tool provided is an exact path.Providing a wrapper manually is still possible and overrides the
RUSTC_WRAPPER
.If the path to the tool includes spaces it is otherwise impossible to provide a compiler cache like sccache through the CXX or CC environment variables, as the arguments will be split up incorrectly.
See also: corrosion-rs/corrosion#474