Skip to content

Commit 499f1a0

Browse files
authored
Merge pull request #630 from Kloenk/fix_if_available
scripts: fix RUST_LIB_SRC detection
2 parents d37432d + 0d0d23f commit 499f1a0

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)