Skip to content

Commit c990a19

Browse files
Kobzolcuviper
authored andcommitted
Do not use rustup to build Rust for Linux
(cherry picked from commit e3117e6)
1 parent 0e8fd2d commit c990a19

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

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

+8-10
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,10 @@ LINUX_VERSION=v6.13-rc1
88
../x.py build --stage 2 library rustdoc clippy rustfmt
99
../x.py build --stage 0 cargo
1010

11-
# Install rustup so that we can use the built toolchain easily, and also
12-
# install bindgen in an easy way.
13-
curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
14-
sh rustup.sh -y --default-toolchain none
11+
BUILD_DIR=$(realpath ./build/x86_64-unknown-linux-gnu)
1512

16-
source /cargo/env
17-
18-
BUILD_DIR=$(realpath ./build)
19-
rustup toolchain link local "${BUILD_DIR}"/x86_64-unknown-linux-gnu/stage2
20-
rustup default local
13+
# Provide path to rustc, rustdoc, clippy-driver and rustfmt to RfL
14+
export PATH=${PATH}:${BUILD_DIR}/stage2/bin
2115

2216
mkdir -p rfl
2317
cd rfl
@@ -33,10 +27,14 @@ git -C linux fetch --depth 1 origin ${LINUX_VERSION}
3327
git -C linux checkout FETCH_HEAD
3428

3529
# Install bindgen
36-
"${BUILD_DIR}"/x86_64-unknown-linux-gnu/stage0/bin/cargo install \
30+
"${BUILD_DIR}"/stage0/bin/cargo install \
3731
--version $(linux/scripts/min-tool-version.sh bindgen) \
32+
--root ${BUILD_DIR}/bindgen \
3833
bindgen-cli
3934

35+
# Provide path to bindgen to RfL
36+
export PATH=${PATH}:${BUILD_DIR}/bindgen/bin
37+
4038
# Configure Rust for Linux
4139
cat <<EOF > linux/kernel/configs/rfl-for-rust-ci.config
4240
# CONFIG_WERROR is not set

0 commit comments

Comments
 (0)