File tree Expand file tree Collapse file tree 5 files changed +35
-5
lines changed
src/ci/docker/host-x86_64 Expand file tree Collapse file tree 5 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -ex
4+
5+ apt-get install flex libmpfr-dev libgmp-dev libmpc3 libmpc-dev
6+
7+ # Setting up folders for GCC
8+ git clone https://github.com/antoyo/gcc gcc-src
9+ cd gcc-src
10+ git checkout $( head -1 /scripts/libgccjit.version)
11+
12+ mkdir ../gcc-build ../gcc-install
13+ cd ../gcc-build
14+
15+ # Building GCC.
16+ ../gcc-src/configure \
17+ --enable-host-shared \
18+ --enable-languages=jit \
19+ --enable-checking=release \
20+ --disable-bootstrap \
21+ --disable-multilib \
22+ --prefix=$( pwd) /../gcc-install
23+ make
24+ make install
25+
26+ # Making the generated `.so` library available to linker.
27+ ln -s ../gcc-install/libgccjit.so /usr/lib/libgccjit.so
28+
29+ rm -rf ../gcc-src
Original file line number Diff line number Diff line change 1+ compiler/rustc_codegen_gcc/libgccjit.version
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2424 xz-utils \
2525 nodejs \
2626 mingw-w64 \
27- libgccjit-12-dev \
2827 && rm -rf /var/lib/apt/lists/*
2928
3029# Note: libgccjit needs to match the default gcc version for the linker to find it.
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2424 xz-utils \
2525 nodejs \
2626 mingw-w64 \
27- libgccjit-13-dev \
2827 && rm -rf /var/lib/apt/lists/*
2928
3029# Note: libgccjit needs to match the default gcc version for the linker to find it.
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515 sudo \
1616 xz-utils \
1717 tidy \
18- libgccjit-12-dev \
1918 \
2019# Install dependencies for chromium browser
2120 gconf-service \
@@ -62,8 +61,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
6261COPY scripts/sccache.sh /scripts/
6362RUN sh /scripts/sccache.sh
6463
65- # Make `libgccjit.so` accessible.
66- RUN ln -s /usr/lib/gcc/x86_64-linux-gnu/12/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
6764# Fix rustc_codegen_gcc lto issues.
6865ENV GCC_EXEC_PREFIX="/usr/lib/gcc/"
6966
@@ -92,6 +89,11 @@ ENV RUST_CONFIGURE_ARGS \
9289
9390ENV HOST_TARGET x86_64-unknown-linux-gnu
9491
92+ COPY host-x86_64/dist-x86_64-linux/libgccjit.version /scripts/
93+ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
94+
95+ RUN sh /scripts/build-gccjit.sh
96+
9597ENV SCRIPT /tmp/checktools.sh ../x.py && \
9698 NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \
9799 --test-args "'--no-sandbox --jobs 1'"
You can’t perform that action at this time.
0 commit comments