-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
RUSTC, RUSTC_WRAPPER are not respected for doctests #12532
Comments
|
I believe that is the intended behavior. That is how the |
@ehuss what exactly is the intended behavior? That I set |
I think once that flag's behavior is stabilized as the default behavior it will be consistent: |
Is that the current behavior? At the time I wrote this bug report I think that was not the case. |
It's the behavior that |
Oh I see, now I understand. Does that also properly apply |
No, those still need implementing separately, and |
target.runner
are not respected for docteststarget.runner
and target.linker
are not respected for doctests
target.runner
and target.linker
are not respected for doctests
When setting RUSTC or RUSTC_WRAPPER, ideally that would affect all
rustc
invocations that happen during a build. However, right now, rustdoc running doctests will still directly callrustc
and bypass those environment variables. IMO this is a bug, cargo should instruct rustdoc to invoke the right rustc. The same goes for thetarget.runner
.Due to this issue,
cargo-miri
currently has to do some abhorrent hacks where it intercepts cargo invoking rustdoc, and adjusts the--runtool
and--test-builder
flags so that they match RUSTC andtarget.runner
. But ideally cargo would just do that by itself.For RUSTC_WRAPPER, rustdoc needs to gain a new flag with "wrapper" semantics; that is being worked in in rust-lang/rust#114651.
The text was updated successfully, but these errors were encountered: