Version 12 (modified by 20 months ago) ( diff ) | ,
---|
Rust ¶
There are releases at https://github.com/rust-lang/rust but do NOT use those to try to bootstrap - the tarballs are much smaller, various essential parts are missing. The only real benefit of looking at releases there is that it's possible to see the versions.
The source needs to be downloaded from https://static.rust-lang.org/dist/ as rustc-<VERSION>-src.tar.gz : this site is NOT searchable.
Building newer versions ¶
Firefox-97 will need at least rustc-1.57.0. That version would need an amended sed to force the correct (rust) curl and curl-sys crates (not tested). Using rustc-1.58.0 picks up new enough crates and works. However, there are a lot more test failures (in the absence of gdb, only one failure is not in 'assembly'), as with 1.56 these seem to be caused by the tests using -Werror.
Building with the shipped llvm ¶
This should always be reliable, but the build is a lot slower than with system llvm.
The changes in config.toml to use shipped llvm are:
- Comment out link-shared = true
- Remove the [target-...] sections with their pointers to llvm-config.
Building w/o internet connection ¶
See https://www.linuxfromscratch.org/hints/downloads/files/rustc-offline-hint.txt
Upgrading from 1.x.y to 1.(x+1).z or Rebuilding ¶
If you've already installed Rustc-1.x.y and now you are building Rustc-1.(x+1).z (where x, y, z are any integers),
or rebuilding Rustc-1.x.y itself, you may add two lines into the [build]
section of config.toml
:
rustc = '/opt/rustc-1.x.y/bin/rustc' cargo = '/opt/rustc-1.x.y/bin/cargo'
Then the building system will use Rustc-1.x.y as the bootstrap compiler, instead of downloading a pre-built binary. So this method can also avoid a dependency on the Internet connection.
Note that this generally won't work if you are building neither Rustc-1.(x+1).z nor Rustc-1.x.y.
And, even if this method is used, running the test suite will still download a pre-built binary.