unwind: don't build dependency when building for Miri#100532
unwind: don't build dependency when building for Miri#100532bors merged 1 commit intorust-lang:masterfrom
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
library/unwind/build.rs
Outdated
There was a problem hiding this comment.
Should there be a rerun-if-changed for this, or does cargo rerun anyway when the cfg flags change?
There was a problem hiding this comment.
A dedicated rerun-if-change definitely won't hurt, I think.
That said, presumably you actually don't want to re-run the script (and rebuild the world) when switching between --cfg=miri and not, if you've previously had it build successfully? RUST_CHECK has similar behavior where once we've built LLVM, it never gets passed down (even in check builds).
I admit I've not followed the story around cfg(miri) enough to know where we're setting that or how, can you point me to that?
There was a problem hiding this comment.
A dedicated rerun-if-change definitely won't hurt, I think.
Done.
I admit I've not followed the story around cfg(miri) enough to know where we're setting that or how, can you point me to that?
Miri sets --cfg miri on all things it builds: here the flag is defined, here it is added.
Miri also uses a separate target dir, so for a given target dir, it should never be the case that it is sometimes built with --cfg miri and sometimes without.
RUST_CHECK has similar behavior where once we've built LLVM, it never gets passed down (even in check builds).
So that is some further extra magic and rustbuild implements?
There was a problem hiding this comment.
Ah, okay, if this never differs for a given target dir then it should be OK -- no need for special magic.
Yes, RUST_CHECK is only set by rustbuild (not Cargo or others); definition here.
|
@rustbot author |
|
@rustbot ready |
|
@bors r+ rollup |
…acrum unwind: don't build dependency when building for Miri This is basically re-submitting rust-lang#94813. In that PR there was a suggestion to instead have bootstrap set a `RUST_CHECK` env var and use that rather than doing something Miri-specific. However, such an env var would mean that when switching between `./x.py check` and `./x.py build`, the build script gets re-run each time, which doesn't seem good. So I think for now checking for Miri probably causes fewer problems. r? `@Mark-Simulacrum`
…acrum unwind: don't build dependency when building for Miri This is basically re-submitting rust-lang#94813. In that PR there was a suggestion to instead have bootstrap set a `RUST_CHECK` env var and use that rather than doing something Miri-specific. However, such an env var would mean that when switching between `./x.py check` and `./x.py build`, the build script gets re-run each time, which doesn't seem good. So I think for now checking for Miri probably causes fewer problems. r? ``@Mark-Simulacrum``
…acrum unwind: don't build dependency when building for Miri This is basically re-submitting rust-lang#94813. In that PR there was a suggestion to instead have bootstrap set a `RUST_CHECK` env var and use that rather than doing something Miri-specific. However, such an env var would mean that when switching between `./x.py check` and `./x.py build`, the build script gets re-run each time, which doesn't seem good. So I think for now checking for Miri probably causes fewer problems. r? ```@Mark-Simulacrum```
…iaskrgr Rollup of 15 pull requests Successful merges: - rust-lang#99474 (Rustdoc json tests: New `@hasexact` test command) - rust-lang#99972 (interpret: only consider 1-ZST when searching for receiver) - rust-lang#100018 (Clean up `LitKind`) - rust-lang#100379 (triagebot: add translation-related mention groups) - rust-lang#100389 (Do not report cycle error when inferring return type for suggestion) - rust-lang#100489 (`is_knowable` use `Result` instead of `Option`) - rust-lang#100532 (unwind: don't build dependency when building for Miri) - rust-lang#100608 (needless separation of impl blocks) - rust-lang#100621 (Pass +atomics-32 feature for {arm,thumb}v4t-none-eabi) - rust-lang#100646 (Migrate emoji identifier diagnostics to `SessionDiagnostic` in rustc_interface) - rust-lang#100652 (Remove deferred sized checks (make them eager)) - rust-lang#100655 (Update books) - rust-lang#100656 (Update cargo) - rust-lang#100660 (Fixed a few documentation errors) - rust-lang#100661 (Fixed a few documentation errors) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This is basically re-submitting #94813.
In that PR there was a suggestion to instead have bootstrap set a
RUST_CHECKenv var and use that rather than doing something Miri-specific. However, such an env var would mean that when switching between./x.py checkand./x.py build, the build script gets re-run each time, which doesn't seem good. So I think for now checking for Miri probably causes fewer problems.r? @Mark-Simulacrum