Skip to content

Commit 838c8be

Browse files
Remove the need to update build-gccjit.sh script every time GCC backend do a sync
1 parent c074d8e commit 838c8be

File tree

6 files changed

+8
-3
lines changed

6 files changed

+8
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ no_llvm_build
5656
/src/tools/x/target
5757
# Created by default with `src/ci/docker/run.sh`
5858
/obj/
59+
/src/ci/docker/scripts/libgccjit.version
5960
# Created by nix dev shell / .envrc
6061
src/tools/nix-dev-shell/flake.lock
6162

src/ci/docker/host-x86_64/x86_64-gnu-llvm-18/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ ENV RUST_CONFIGURE_ARGS \
5555
--set rust.thin-lto-import-instr-limit=10
5656

5757
COPY scripts/shared.sh /scripts/
58+
COPY scripts/libgccjit.version /scripts/
5859
COPY scripts/build-gccjit.sh /scripts/
5960

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

src/ci/docker/host-x86_64/x86_64-gnu-llvm-19/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ ENV RUST_CONFIGURE_ARGS \
5555
--set rust.thin-lto-import-instr-limit=10
5656

5757
COPY scripts/shared.sh /scripts/
58+
COPY scripts/libgccjit.version /scripts/
5859
COPY scripts/build-gccjit.sh /scripts/
5960

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

src/ci/docker/host-x86_64/x86_64-gnu-tools/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ ENV HOST_TARGET x86_64-unknown-linux-gnu
9090
#ENV FORCE_CI_RUSTC 1
9191

9292
COPY scripts/shared.sh /scripts/
93+
COPY scripts/libgccjit.version /scripts/
9394
COPY scripts/build-gccjit.sh /scripts/
9495

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

src/ci/docker/run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ touch $objdir/${SUMMARY_FILE}
325325

326326
extra_env=""
327327
if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
328+
cp /checkout/compiler/rustc_codegen_gcc/libgccjit.version /checkout/src/ci/docker/scripts/libgccjit.version
328329
extra_env="$extra_env --env ENABLE_GCC_CODEGEN=1"
329330
# Fix rustc_codegen_gcc lto issues.
330331
extra_env="$extra_env --env GCC_EXEC_PREFIX=/usr/lib/gcc/"

src/ci/docker/scripts/build-gccjit.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
GIT_REPO="https://github.com/rust-lang/gcc"
44

5-
# This commit hash needs to be updated to use a more recent gcc fork version.
6-
GIT_COMMIT="45648c2edd4ecd862d9f08196d3d6c6ccba79f07"
7-
85
set -ex
96

107
cd $1
118

9+
# This is the forked git commit hash used by the GCC backend.
10+
GIT_COMMIT="$(head -n 1 libgccjit.version)"
11+
1212
source shared.sh
1313

1414
# Setting up folders for GCC

0 commit comments

Comments
 (0)