Since a couple of days, I have the following workflow, to update my rust stuff to more recent versions. I go trough that nearly daily.
- Update local rust installation with rustup.sh
- Check, if my projects are building. If not:
- Fix dependencies (cargo update)
- Fix own code (incompatibilities from one rust version to the next)
- Build with --release
Now the steps, which I want to optimize, because it takes simply to long:
- Checkout compiler source code on same version / hash, that rustc --version delivers
- Build the compiler with arm-unknown-linux-gnueabihf as an extra target.
- Copy the libraries (libstd, libcollections…) from the newly built compiler into my /usr/local/lib/rustlib/arm-unknown-linux-gnueabihf directory, to be able to build my projects for arm too.
- Compile my projects with --release and --target=arm-unknown-linux-gnueabihf
Everything works just fine, but it seems like building an entire rust toolchain with compiler etc…, with all three stages is a bit silly, if I only need the libraries(libstd, …), for my arm target.
How can I achieve, to build for my arm target with standard libraries, without recompiling the whole compiler?
Edit: On my machine bootstrapping a new rust toolchain can take 4 to six hours