Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greatly reduce GCC build logs #122496

Merged
merged 2 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/ci/docker/host-x86_64/dist-x86_64-linux/build-gccjit.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/sh
#!/usr/bin/env bash

set -ex

cd $1

source shared.sh

# Setting up folders for GCC
git clone https://github.com/antoyo/gcc gcc-src
cd gcc-src
Expand All @@ -14,15 +16,17 @@ mkdir ../gcc-build ../gcc-install
cd ../gcc-build

# Building GCC.
../gcc-src/configure \
hide_output \
../gcc-src/configure \
--enable-host-shared \
--enable-languages=jit \
--enable-checking=release \
--disable-bootstrap \
--disable-multilib \
--prefix=$(pwd)/../gcc-install
make
make install
--prefix=$(pwd)/../gcc-install \

hide_output make -j$(nproc)
hide_output make install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to speed up the build by a factor of 4.^^ It was 30min before, now it's...

2024-03-15T12:47:03.8776557Z #14 DONE 446.8s

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. :)


rm -rf ../gcc-src
ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
Expand Down
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-llvm-16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ ENV RUST_CONFIGURE_ARGS \

COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/

COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/

RUN sh /scripts/build-gccjit.sh /scripts
RUN /scripts/build-gccjit.sh /scripts

ENV SCRIPT /tmp/script.sh
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-llvm-17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ ENV RUST_CONFIGURE_ARGS \

COPY host-x86_64/x86_64-gnu-llvm-16/script.sh /tmp/

COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/

RUN sh /scripts/build-gccjit.sh /scripts
RUN /scripts/build-gccjit.sh /scripts

ENV SCRIPT /tmp/script.sh
3 changes: 2 additions & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ ENV RUST_CONFIGURE_ARGS \

ENV HOST_TARGET x86_64-unknown-linux-gnu

COPY host-x86_64/dist-x86_64-linux/shared.sh /scripts/
COPY host-x86_64/dist-x86_64-linux/build-gccjit.sh /scripts/

RUN sh /scripts/build-gccjit.sh /scripts
RUN /scripts/build-gccjit.sh /scripts

ENV SCRIPT /tmp/checktools.sh ../x.py && \
NODE_PATH=`npm root -g` python3 ../x.py test tests/rustdoc-gui --stage 2 \
Expand Down
Loading