Auto merge of #161247 - Kobzol:bootstrap-llvm-3, r=jieyouxu
Assorted bootstrap LLVM refactors (part 3/N) Continuation of https://github.com/rust-lang/rust/pull/160916. This PR removes the `llvm_out` function, and makes it explicit when we need to build the host LLVM. Before, bootstrap used to just arbitrarily run a `llvm-config` binary, even though it might not have been executable on the given host. Now, if we need to execute it, the host LLVM will always be explicitly built. It is possible that there are some cases where this will build LLVM where it didn't before, but that should only happen if you were on a target A, built LLVM for target B, and by sheer luck A could execute code for B (where A != B). In any case, it is now explicit, so if we encounter such situation, we can fix it without depending on implicit assumptions (well, there are still thousands of other assumptions, but you get my point). After this, I'll work on centralizing the sanity checking of downloading LLVM inside the `LlvmFromCi` step, which will allow us to log the exact reason why `download-ci-llvm` might not have been applied, and also enable downloading LLVM from CI for non-host targets. r? jieyouxu
B
bors committed
ac62df9b49f9b9036af2a4957db70bf3850785e1