File tree Expand file tree Collapse file tree 4 files changed +40
-4
lines changed
bootstrap/src/core/build_steps Expand file tree Collapse file tree 4 files changed +40
-4
lines changed Original file line number Diff line number Diff line change @@ -3394,7 +3394,6 @@ impl Step for CodegenGCC {
33943394 . arg ( "--out-dir" )
33953395 . arg ( builder. stage_out ( compiler, Mode :: ToolRustc ) . join ( "cg_gcc" ) )
33963396 . arg ( "--release" )
3397- . arg ( "--no-default-features" )
33983397 . arg ( "--mini-tests" )
33993398 . arg ( "--std-tests" ) ;
34003399 cargo. args ( builder. config . test_args ( ) ) ;
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -ex
4+
5+ cd $1
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+ rm -rf ../gcc-src
27+ ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
28+ ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0
Original file line number Diff line number Diff line change 1+ b6f163f52
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 \
@@ -57,13 +56,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
5756 lsb-release \
5857 xdg-utils \
5958 wget \
59+ # libgccjit dependencies
60+ flex \
61+ libmpfr-dev \
62+ libgmp-dev \
63+ libmpc3 \
64+ libmpc-dev \
6065 && rm -rf /var/lib/apt/lists/*
6166
6267COPY scripts/sccache.sh /scripts/
6368RUN sh /scripts/sccache.sh
6469
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
6770# Fix rustc_codegen_gcc lto issues.
6871ENV GCC_EXEC_PREFIX="/usr/lib/gcc/"
6972
@@ -92,6 +95,11 @@ ENV RUST_CONFIGURE_ARGS \
9295
9396ENV HOST_TARGET x86_64-unknown-linux-gnu
9497
98+ COPY host-x86_64/dist-x86_64-linux/libgccjit.version /scripts/
99+ COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/
100+
101+ RUN sh /scripts/build-gccjit.sh /scripts
102+
95103ENV SCRIPT /tmp/checktools.sh ../x.py && \
96104 NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \
97105 --test-args "'--no-sandbox --jobs 1'"
You can’t perform that action at this time.
0 commit comments