Skip to content

Commit 5ab7445

Browse files
committed
Auto merge of #103295 - ishitatsuyuki:ninja, r=cuviper
ci: Bring back ninja for dist builders The primary reason for this is that make can result in a substantial under utilization of parallelism (noticed while testing on a workstation), mostly due to the submake structure preventing good dependency tracking and scheduling. In f758c7b (Debian 6 doesn't have ninja, so use make for the dist builds) llvm.ninja was disabled due to lack of distro package. This is no longer the case with the CentOS 7 base, so bring ninja back for a performance boost.
2 parents fab0432 + 354e95a commit 5ab7445

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/ci/docker/host-x86_64/dist-i686-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUN yum upgrade -y && \
2323
libstdc++-devel.x86_64 \
2424
make \
2525
ncurses-devel \
26+
ninja-build \
2627
openssl-devel \
2728
patch \
2829
perl \
@@ -64,7 +65,6 @@ ENV RUST_CONFIGURE_ARGS \
6465
--enable-profiler \
6566
--set target.i686-unknown-linux-gnu.linker=clang \
6667
--build=i686-unknown-linux-gnu \
67-
--set llvm.ninja=false \
6868
--set rust.jemalloc
6969
ENV SCRIPT python3 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
7070
ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang

src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ RUN yum upgrade -y && \
2323
libstdc++-devel.x86_64 \
2424
make \
2525
ncurses-devel \
26+
ninja-build \
2627
openssl-devel \
2728
patch \
2829
perl \
@@ -76,7 +77,6 @@ ENV RUST_CONFIGURE_ARGS \
7677
--set target.x86_64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \
7778
--set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
7879
--set llvm.thin-lto=true \
79-
--set llvm.ninja=false \
8080
--set rust.jemalloc \
8181
--set rust.use-lld=true \
8282
--set rust.lto=thin

src/ci/docker/host-x86_64/dist-x86_64-linux/build-clang.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ INC="/rustroot/include:/usr/include"
2525
# disable them. BOLT is used for optimizing LLVM.
2626
hide_output \
2727
cmake ../llvm \
28+
-GNinja \
2829
-DCMAKE_C_COMPILER=/rustroot/bin/gcc \
2930
-DCMAKE_CXX_COMPILER=/rustroot/bin/g++ \
3031
-DCMAKE_BUILD_TYPE=Release \
@@ -39,8 +40,8 @@ hide_output \
3940
-DLLVM_ENABLE_PROJECTS="clang;lld;compiler-rt;bolt" \
4041
-DC_INCLUDE_DIRS="$INC"
4142

42-
hide_output make -j$(nproc)
43-
hide_output make install
43+
hide_output ninja
44+
hide_output ninja install
4445

4546
cd ../..
4647
rm -rf llvm-project

0 commit comments

Comments
 (0)