about summary refs log tree commit diff
path: root/src/ci/docker/scripts
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-13 15:20:11 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-13 15:20:11 +0800
commit7bde17630561c8df94676cb6950b27c648de0e54 (patch)
tree36f02f05011b3474033443ffd46313083c1da9f7 /src/ci/docker/scripts
parentd4c5e752c51e61f9a34188d214d15647d7653dca (diff)
parent8536f201ffdb2c24925d7f9e87996d7dca93428b (diff)
downloadrust-7bde17630561c8df94676cb6950b27c648de0e54.tar.gz
rust-7bde17630561c8df94676cb6950b27c648de0e54.zip
Merge from rustc
Diffstat (limited to 'src/ci/docker/scripts')
-rwxr-xr-xsrc/ci/docker/scripts/build-gccjit.sh37
-rwxr-xr-xsrc/ci/docker/scripts/rfl-build.sh18
2 files changed, 8 insertions, 47 deletions
diff --git a/src/ci/docker/scripts/build-gccjit.sh b/src/ci/docker/scripts/build-gccjit.sh
deleted file mode 100755
index 43ed2270d31..00000000000
--- a/src/ci/docker/scripts/build-gccjit.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-
-GIT_REPO="https://github.com/rust-lang/gcc"
-
-# This commit hash needs to be updated to use a more recent gcc fork version.
-GIT_COMMIT="45648c2edd4ecd862d9f08196d3d6c6ccba79f07"
-
-set -ex
-
-cd $1
-
-source shared.sh
-
-# Setting up folders for GCC
-curl -L "$GIT_REPO/archive/$GIT_COMMIT.tar.gz" |
-    tar -xz --transform "s/gcc-$GIT_COMMIT/gcc-src/"
-
-mkdir gcc-build gcc-install
-pushd gcc-build
-
-# Building GCC.
-hide_output \
-  ../gcc-src/configure \
-    --enable-host-shared \
-    --enable-languages=jit \
-    --enable-checking=release \
-    --disable-bootstrap \
-    --disable-multilib \
-    --prefix=$(pwd)/../gcc-install \
-
-hide_output make -j$(nproc)
-hide_output make install
-
-popd
-rm -rf gcc-src gcc-build
-ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
-ln -s /scripts/gcc-install/lib/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so.0
diff --git a/src/ci/docker/scripts/rfl-build.sh b/src/ci/docker/scripts/rfl-build.sh
index 573821c3e59..ea8066d95e0 100755
--- a/src/ci/docker/scripts/rfl-build.sh
+++ b/src/ci/docker/scripts/rfl-build.sh
@@ -8,16 +8,10 @@ LINUX_VERSION=v6.14-rc3
 ../x.py build --stage 2 library rustdoc clippy rustfmt
 ../x.py build --stage 0 cargo
 
-# Install rustup so that we can use the built toolchain easily, and also
-# install bindgen in an easy way.
-curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
-sh rustup.sh -y --default-toolchain none
+BUILD_DIR=$(realpath ./build/x86_64-unknown-linux-gnu)
 
-source /cargo/env
-
-BUILD_DIR=$(realpath ./build)
-rustup toolchain link local "${BUILD_DIR}"/x86_64-unknown-linux-gnu/stage2
-rustup default local
+# Provide path to rustc, rustdoc, clippy-driver and rustfmt to RfL
+export PATH=${PATH}:${BUILD_DIR}/stage2/bin
 
 mkdir -p rfl
 cd rfl
@@ -33,10 +27,14 @@ git -C linux fetch --depth 1 origin ${LINUX_VERSION}
 git -C linux checkout FETCH_HEAD
 
 # Install bindgen
-"${BUILD_DIR}"/x86_64-unknown-linux-gnu/stage0/bin/cargo install \
+"${BUILD_DIR}"/stage0/bin/cargo install \
   --version $(linux/scripts/min-tool-version.sh bindgen) \
+  --root ${BUILD_DIR}/bindgen \
   bindgen-cli
 
+# Provide path to bindgen to RfL
+export PATH=${PATH}:${BUILD_DIR}/bindgen/bin
+
 # Configure Rust for Linux
 cat <<EOF > linux/kernel/configs/rfl-for-rust-ci.config
 # CONFIG_WERROR is not set