Skip to content
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

Document behavior of mixing RUSTC and RUSTC_WRAPPER #10886

Closed
RalfJung opened this issue Jul 21, 2022 · 1 comment · Fixed by #10896
Closed

Document behavior of mixing RUSTC and RUSTC_WRAPPER #10886

RalfJung opened this issue Jul 21, 2022 · 1 comment · Fixed by #10896

Comments

@RalfJung
Copy link
Member

Through a lot of confused debugging, I found out that the following part of the documentation for RUSTC_WRAPPER is not, in general, correct:

Instead of simply running rustc, Cargo will execute this specified wrapper instead, passing as its command-line arguments the rustc invocation, with the first argument being rustc.

The first argument will in fact be the value of the RUSTC env var, if that is set. I don't know if this is intended, it is certainly not what I expected.

@RalfJung
Copy link
Member Author

I noticed here it actually says

The first argument passed to the wrapper is the path to the actual rustc.

So it's only the env var part that is wrong/misleading. (But this also probably means we cannot change behavior to make this always pass rustc as 2nd argument, which is a bummer. I guess the current behavior is actually intended then.)

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 a pull request may close this issue.

1 participant