Skip to content

Commit 95efb00

Browse files
committed
Build ninja on Linux Docker CI builds
1 parent 4f8e2e3 commit 95efb00

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ COPY host-x86_64/dist-x86_64-linux/build-clang.sh /tmp/
9898
RUN ./build-clang.sh
9999
ENV CC=clang CXX=clang++
100100

101+
# Build Ninja for faster LLVM builds.
102+
COPY host-x86_64/dist-x86_64-linux/build-ninja.sh /tmp/
103+
RUN ./build-ninja.sh
104+
101105
# rustc-perf version from 2022-04-05
102106
ENV PERF_COMMIT 04fccd80396f954b339c366e30221f4bd52c5e03
103107
RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_COMMIT.zip && \
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
source shared.sh
6+
7+
NINJA=v1.10.2
8+
9+
mkdir ninja
10+
cd ninja
11+
12+
curl -L https://github.com/ninja-build/ninja/archive/refs/tags/$NINJA.tar.gz | \
13+
tar xzf - --strip-components 1
14+
15+
mkdir ninja-build
16+
cd ninja-build
17+
18+
hide_output cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/rustroot
19+
20+
hide_output make -j$(nproc)
21+
hide_output make install
22+
23+
cd ../..
24+
rm -rf ninja

0 commit comments

Comments
 (0)