Skip to content

Commit 0d0d23f

Browse files
committed
scripts: fix RUST_LIB_SRC detection
Uses the content of RUST_LIB_SRC variable if defined in rust-is-available.sh Signed-off-by: Finn Behrens <[email protected]>
1 parent 9646c0e commit 0d0d23f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/rust-is-available.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fi
146146
#
147147
# `$KRUSTFLAGS` is passed in case the user added `--sysroot`.
148148
rustc_sysroot=$("$RUSTC" $KRUSTFLAGS --print sysroot)
149-
rustc_src="$rustc_sysroot/lib/rustlib/src/rust/library"
149+
rustc_src=${RUST_LIB_SRC:-"$rustc_sysroot/lib/rustlib/src/rust/library"}
150150
rustc_src_core="$rustc_src/core/src/lib.rs"
151151
if [ ! -e "$rustc_src_core" ]; then
152152
if [ "$1" = -v ]; then

0 commit comments

Comments
 (0)