Skip to content

Commit bd28641

Browse files
committed
rustbuild: Disable docs on cross-compiled builds
This commit disables building documentation on cross-compiled compilers, for example ARM/MIPS/PowerPC/etc. Currently I believe we're not getting much use out of these documentation artifacts and they often take 10-15 minutes total to build as it requires building rustdoc/rustbook and then also generating all the documentation, especially for the reference and the book itself. In an effort to cut down on the amount of work that we're doing on dist CI builders in light of recent timeouts this was some relatively low hanging fruit to cut which in theory won't have much impact on the ecosystem in the hopes that the documentation isn't used too heavily anyway. While initial analysis in rust-lang#48827 showed only shaving 5 minutes off local builds the same 5 minute conclusion was drawn from rust-lang#48826 which ended up having nearly a half-hour impact on the bots. In that sense I'm hoping that we can land this and test out what happens on CI to see how it affects timing. Note that all tier 1 platforms, Windows, Mac, and Linux, will continue to generate documentation.
1 parent 445fafa commit bd28641

File tree

22 files changed

+33
-26
lines changed

22 files changed

+33
-26
lines changed

src/bootstrap/compile.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl Step for Std {
9898
copy_musl_third_party_objects(build, target, &libdir);
9999
}
100100

101-
let out_dir = build.stage_out(compiler, Mode::Libstd);
101+
let out_dir = build.cargo_out(compiler, Mode::Libstd, target);
102102
build.clear_if_dirty(&out_dir, &builder.rustc(compiler));
103103
let mut cargo = builder.cargo(compiler, Mode::Libstd, target, "build");
104104
std_cargo(builder, &compiler, target, &mut cargo);
@@ -360,7 +360,7 @@ impl Step for Test {
360360
return;
361361
}
362362

363-
let out_dir = build.stage_out(compiler, Mode::Libtest);
363+
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
364364
build.clear_if_dirty(&out_dir, &libstd_stamp(build, compiler, target));
365365
let mut cargo = builder.cargo(compiler, Mode::Libtest, target, "build");
366366
test_cargo(build, &compiler, target, &mut cargo);
@@ -482,10 +482,9 @@ impl Step for Rustc {
482482
compiler: builder.compiler(self.compiler.stage, build.build),
483483
target: build.build,
484484
});
485-
486-
let stage_out = builder.stage_out(compiler, Mode::Librustc);
487-
build.clear_if_dirty(&stage_out, &libstd_stamp(build, compiler, target));
488-
build.clear_if_dirty(&stage_out, &libtest_stamp(build, compiler, target));
485+
let cargo_out = builder.cargo_out(compiler, Mode::Librustc, target);
486+
build.clear_if_dirty(&cargo_out, &libstd_stamp(build, compiler, target));
487+
build.clear_if_dirty(&cargo_out, &libtest_stamp(build, compiler, target));
489488

490489
let mut cargo = builder.cargo(compiler, Mode::Librustc, target, "build");
491490
rustc_cargo(build, &mut cargo);

src/bootstrap/tool.rs

+4
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,10 @@ impl Step for Rustdoc {
338338
};
339339

340340
builder.ensure(compile::Rustc { compiler: build_compiler, target });
341+
builder.ensure(compile::Rustc {
342+
compiler: build_compiler,
343+
target: builder.build.build,
344+
});
341345

342346
let mut cargo = prepare_tool_cargo(builder,
343347
build_compiler,

src/ci/docker/dist-aarch64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
3232

3333
ENV HOSTS=aarch64-unknown-linux-gnu
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-android/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ ENV RUST_CONFIGURE_ARGS \
2626
--armv7-linux-androideabi-ndk=/android/ndk/arm-14 \
2727
--i686-linux-android-ndk=/android/ndk/x86-14 \
2828
--aarch64-linux-android-ndk=/android/ndk/arm64-21 \
29-
--x86_64-linux-android-ndk=/android/ndk/x86_64-21
29+
--x86_64-linux-android-ndk=/android/ndk/x86_64-21 \
30+
--disable-docs
3031

3132
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
3233

src/ci/docker/dist-arm-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabi=arm-unknown-linux-gnueabi-gcc \
3232

3333
ENV HOSTS=arm-unknown-linux-gnueabi
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-armhf-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_arm_unknown_linux_gnueabihf=arm-unknown-linux-gnueabihf-gcc \
3232

3333
ENV HOSTS=arm-unknown-linux-gnueabihf
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-armv7-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV CC_armv7_unknown_linux_gnueabihf=armv7-unknown-linux-gnueabihf-gcc \
3232

3333
ENV HOSTS=armv7-unknown-linux-gnueabihf
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ RUN sh /scripts/sccache.sh
3232
ENV RUST_CONFIGURE_ARGS \
3333
--musl-root-i586=/musl-i586 \
3434
--musl-root-i686=/musl-i686 \
35-
--enable-extended
35+
--enable-extended \
36+
--disable-docs
3637

3738
# Newer binutils broke things on some vms/distros (i.e., linking against
3839
# unknown relocs disabled by the following flag), so we need to go out of our

src/ci/docker/dist-i686-freebsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ENV \
2929

3030
ENV HOSTS=i686-unknown-freebsd
3131

32-
ENV RUST_CONFIGURE_ARGS --enable-extended
32+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3333
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-mips-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh
2222

2323
ENV HOSTS=mips-unknown-linux-gnu
2424

25-
ENV RUST_CONFIGURE_ARGS --enable-extended
25+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2626
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-mips64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh
2121

2222
ENV HOSTS=mips64-unknown-linux-gnuabi64
2323

24-
ENV RUST_CONFIGURE_ARGS --enable-extended
24+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2525
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-mips64el-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ RUN sh /scripts/sccache.sh
2222

2323
ENV HOSTS=mips64el-unknown-linux-gnuabi64
2424

25-
ENV RUST_CONFIGURE_ARGS --enable-extended
25+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2626
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-mipsel-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ RUN sh /scripts/sccache.sh
2121

2222
ENV HOSTS=mipsel-unknown-linux-gnu
2323

24-
ENV RUST_CONFIGURE_ARGS --enable-extended
24+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
2525
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-powerpc-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ENV \
3434

3535
ENV HOSTS=powerpc-unknown-linux-gnu
3636

37-
ENV RUST_CONFIGURE_ARGS --enable-extended
37+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3838
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
3939

4040
# FIXME(#36150) this will fail the bootstrap. Probably means something bad is

src/ci/docker/dist-powerpc64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ ENV \
3535

3636
ENV HOSTS=powerpc64-unknown-linux-gnu
3737

38-
ENV RUST_CONFIGURE_ARGS --enable-extended
38+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3939
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-powerpc64le-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ ENV \
3232

3333
ENV HOSTS=powerpc64le-unknown-linux-gnu
3434

35-
ENV RUST_CONFIGURE_ARGS --enable-extended
35+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3636
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-s390x-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ ENV \
3434

3535
ENV HOSTS=s390x-unknown-linux-gnu
3636

37-
ENV RUST_CONFIGURE_ARGS --enable-extended
37+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3838
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-various-1/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ ENV RUST_CONFIGURE_ARGS \
9595
--musl-root-aarch64=/musl-aarch64 \
9696
--musl-root-mips=/musl-mips \
9797
--musl-root-mipsel=/musl-mipsel \
98-
--enable-emscripten
98+
--enable-emscripten \
99+
--disable-docs
99100

100101
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS
101102

src/ci/docker/dist-various-2/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ ENV TARGETS=$TARGETS,x86_64-sun-solaris
5555
ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
5656
ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
5757

58-
ENV RUST_CONFIGURE_ARGS --enable-extended
58+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
5959
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

src/ci/docker/dist-x86_64-freebsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ENV \
2929

3030
ENV HOSTS=x86_64-unknown-freebsd
3131

32-
ENV RUST_CONFIGURE_ARGS --enable-extended
32+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3333
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

src/ci/docker/dist-x86_64-musl/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ RUN sh /scripts/sccache.sh
3131

3232
ENV RUST_CONFIGURE_ARGS \
3333
--musl-root-x86_64=/musl-x86_64 \
34-
--enable-extended
34+
--enable-extended \
35+
--disable-docs
3536

3637
# Newer binutils broke things on some vms/distros (i.e., linking against
3738
# unknown relocs disabled by the following flag), so we need to go out of our

src/ci/docker/dist-x86_64-netbsd/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ ENV \
3333

3434
ENV HOSTS=x86_64-unknown-netbsd
3535

36-
ENV RUST_CONFIGURE_ARGS --enable-extended
36+
ENV RUST_CONFIGURE_ARGS --enable-extended --disable-docs
3737
ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS

0 commit comments

Comments
 (0)