]> git.lizzy.rs Git - rust.git/commit
rustbuild: Quickly `dist` cross-host compilers
authorAlex Crichton <alex@alexcrichton.com>
Sat, 31 Dec 2016 03:50:57 +0000 (19:50 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 4 Jan 2017 19:41:16 +0000 (11:41 -0800)
commit1a040b36cb5c748b1e5f0ea0a97f7ec5a51ee48d
tree3dae9d8837f45ef473008579539ee135e032670c
parent8f62c2920077eb5cb81323142fc5dbe6ae8813c0
rustbuild: Quickly `dist` cross-host compilers

This commit optimizes the compile time for creating tarballs of cross-host
compilers and as a proof of concept adds two to the standard Travis matrix. Much
of this commit is further refactoring and refining of the `step.rs` definitions
along with the interpretation of `--target` and `--host` flags. This has gotten
confusing enough that I've also added a small test suite to
`src/bootstrap/step.rs` to ensure what we're doing works and doesn't regress.

After this commit when you execute:

    ./x.py dist --host $MY_HOST --target $MY_HOST

the build system will compile two compilers. The first is for the build platform
and the second is for the host platform. This second compiler is then packaged
up and placed into `build/dist` and is ready to go. With a fully cached LLVM and
docker image I was able to create a cross-host compiler in around 20 minutes
locally.

Eventually we plan to add a whole litany of cross-host entries to the Travis
matrix, but for now we're just adding a few before we eat up all the extra
capacity.

cc #38531
.travis.yml
src/bootstrap/Cargo.toml
src/bootstrap/check.rs
src/bootstrap/dist.rs
src/bootstrap/doc.rs
src/bootstrap/step.rs
src/ci/docker/dist-arm-unknown-linux-gnueabi/Dockerfile [new file with mode: 0644]
src/ci/docker/dist-x86_64-unknown-freebsd/Dockerfile [new file with mode: 0644]
src/ci/docker/dist-x86_64-unknown-freebsd/build-toolchain.sh [new file with mode: 0644]
src/ci/docker/x86_64-freebsd/Dockerfile [deleted file]
src/ci/docker/x86_64-freebsd/build-toolchain.sh [deleted file]