Closed
Description
In investigating #138039, here are some observations:
I am running this command as an illustration:
./x dist --host powerpc64le-unknown-linux-gnu --target powerpc64le-unknown-linux-gnu --dry-run | grep "compiler artifacts"
After #138039
No config:
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Building compiler artifacts (stage1 -> stage2, x86_64-unknown-linux-gnu)
Building compiler artifacts (stage1:x86_64-unknown-linux-gnu -> stage2:powerpc64le-unknown-linux-gnu)
Not really clear why it is doing stage1 -> stage2, x86_64-unknown-linux-gnu
, that should not be needed.
With the config:
[build]
docs = false
Yay, it seems to be doing the right thing:
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Building compiler artifacts (stage1:x86_64-unknown-linux-gnu -> stage2:powerpc64le-unknown-linux-gnu)
With the config:
[build]
docs = false
[rust]
llvm-bitcode-linker = true
Boo, it seems to build the host compiler twice when it shouldn't:
Building compiler artifacts (stage0 -> stage1, x86_64-unknown-linux-gnu)
Building compiler artifacts (stage1:x86_64-unknown-linux-gnu -> stage2:powerpc64le-unknown-linux-gnu)
Building compiler artifacts (stage0:x86_64-unknown-linux-gnu -> stage1:powerpc64le-unknown-linux-gnu)
Before #137215
The "no config" behavior is the same, but the other configs seem to work correctly (only two compilers built).
Docs
I only vaguely recall building the docs requires linking to the compiler.... I don't have time at the moment to refresh my memory. I don't know if it is absolutely required to have a stage2 compiler for that. It might be good to see if there are alternate solutions.