rustbuild: Pass ccache to build scripts#48059
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
src/bootstrap/builder.rs
Outdated
There was a problem hiding this comment.
Why we need to special-case ccache | sccache here?
There was a problem hiding this comment.
Unfortunately cc-rs isn't the most general either :(
There was a problem hiding this comment.
So to me it seems like both places are somewhat wrong - and would be nice to fix. I install sccache locally and it would ideally be supported by path too. To be specific, I configure sccache = "/some/path/sccache" which we should probably support here... And eventually in cc too.
There was a problem hiding this comment.
I'll leave a comment saying how to fix this, but I'll probably leave as-is for now.
Mark-Simulacrum
left a comment
There was a problem hiding this comment.
r=me if you don't think my suggestion makes sense at this point. We can always improve further later.
src/bootstrap/builder.rs
Outdated
There was a problem hiding this comment.
So to me it seems like both places are somewhat wrong - and would be nice to fix. I install sccache locally and it would ideally be supported by path too. To be specific, I configure sccache = "/some/path/sccache" which we should probably support here... And eventually in cc too.
Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
25381d7 to
64a8730
Compare
|
@bors: r=Mark-Simulacrum |
|
📌 Commit 64a8730 has been approved by |
…lacrum rustbuild: Pass `ccache` to build scripts Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
|
@bors: rollup |
…lacrum rustbuild: Pass `ccache` to build scripts Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
…lacrum rustbuild: Pass `ccache` to build scripts Right now the ccache setting is only used for LLVM, but this tweaks it to also be used for build scripts so C++ builds like `librustc_llvm` can be a bit speedier.
Try to fix 48116 and 48192 The bug #48116 happens because of a misoptimization of the `import_path_to_string` function, where a `names` slice is empty but the `!names.is_empty()` branch is executed. https://github.com/rust-lang/rust/blob/4d2d3fc5dadf894a8ad709a5860a549f2c0b1032/src/librustc_resolve/resolve_imports.rs#L1015-L1042 Yesterday, @eddyb had locally reproduced the bug, and [came across the `position` function](https://mozilla.logbot.info/rust-infra/20180214#c14296834) where the `assume()` call is found to be suspicious. We have *not* concluded that this `assume()` causes #48116, but given [the reputation of `assume()`](#45501 (comment)), this seems higher relevant. Here we try to see if commenting it out can fix the errors. Later @alexcrichton has bisected and found a potential bug [in the LLVM side](#48116 (comment)). We are currently testing if reverting that LLVM commit is enough to stop the bug. If true, this PR can be reverted (keep the `assume()`) and we could backport the LLVM patch instead. (This PR also includes an earlier commit from #48127 for help debugging ICE happening in compile-fail/parse-fail tests.) The PR also reverts #48059, which seems to cause #48192. r? @alexcrichton cc @eddyb, @arthurprs (#47333)
Right now the ccache setting is only used for LLVM, but this tweaks it to also
be used for build scripts so C++ builds like
librustc_llvmcan be a bitspeedier.