Skip to content

Commit 0c85f2a

Browse files
committed
Auto merge of #38847 - michaelwoerister:gate-on-incr-comp, r=alexcrichton
travis: Gate on some minimal support for incremental compilation. This commit adds a travis job that 1. builds a stage2 compiler in incremental mode (but with empty incremental compilation cache), and 2. builds and runs the run-pass test suite also in incremental mode. Building incrementally with an empty cache makes sure that the compiler doesn't crash in dependency tracking during bootstrapping. Executing the incrementally built test suite gives some measure of confidence that we generate valid code. Note, however, that the above does not give strong guarantees about the validity of incremental compilation, it just provides a basis for being able to rely on from-scratch incr. comp. builds as reference values in further tests (which then do actual incremental compilation). r? @alexcrichton
2 parents b854d74 + d292e12 commit 0c85f2a

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

Diff for: .travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ matrix:
3535
- env: IMAGE=x86_64-gnu-make
3636
- env: IMAGE=x86_64-gnu-llvm-3.7 ALLOW_PR=1 RUST_BACKTRACE=1
3737
- env: IMAGE=x86_64-gnu-distcheck
38+
- env: IMAGE=x86_64-gnu-incremental
3839

3940
# OSX builders
4041
- env: >

Diff for: src/ci/docker/x86_64-gnu-incremental/Dockerfile

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get install -y --no-install-recommends \
4+
g++ \
5+
make \
6+
file \
7+
curl \
8+
ca-certificates \
9+
python2.7 \
10+
git \
11+
cmake \
12+
sudo \
13+
gdb \
14+
xz-utils
15+
16+
ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
17+
RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
18+
tar xJf - -C /usr/local/bin --strip-components=1
19+
20+
RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
21+
dpkg -i dumb-init_*.deb && \
22+
rm dumb-init_*.deb
23+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
24+
25+
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
26+
ENV RUSTFLAGS -Zincremental=/tmp/rust-incr-cache
27+
ENV RUST_CHECK_TARGET check

Diff for: src/tools/compiletest/src/runtest.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2175,6 +2175,10 @@ actual:\n\
21752175
.env("LLVM_COMPONENTS", &self.config.llvm_components)
21762176
.env("LLVM_CXXFLAGS", &self.config.llvm_cxxflags);
21772177

2178+
// We don't want RUSTFLAGS set from the outside to interfere with
2179+
// compiler flags set in the test cases:
2180+
cmd.env_remove("RUSTFLAGS");
2181+
21782182
if self.config.target.contains("msvc") {
21792183
// We need to pass a path to `lib.exe`, so assume that `cc` is `cl.exe`
21802184
// and that `lib.exe` lives next to it.

0 commit comments

Comments
 (0)