You can use ./x.py build --stage 2 and then link the stage2 toolchain to get rustc-dev. For llvm-tools-preview I though that was the default and rust-src, not sure how to add it. Another option would be to use ./x.py dist to create tarballs with all components and then extract them into the same directory.
Thanks, the ./x.py dist actually works.
The workflow is:
build & install your custom toolchain to a folder.
run ./x.py dist, then you can get many compressed components in the build/dist folder
Select the component you want and decompress it, there is an install.sh script, you can use that script to install the component to your custom toolchain. One example of mine is ./install.sh --prefix=~/rust_custom --components=rustc-dev, suppose I installed my toolchain in ~/rust_custom folder.
hello, I'm compiling my own rust compiler, too. And I met the same problem.
= note: Could not find tool: lld
at: /home/hky/rust/rust-source-code/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/bin/rust-lld
Consider `rustup component add llvm-tools-preview`
error: could not compile `hello_world` due to previous error
Could you explain more specifically, which component includes the llvm-tools-preview, where can I find it?
thanks a lot!