File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ set -euo pipefail
8
8
# # ./run-test.sh CRATE_NAME CARGO_TEST_ARGS
9
9
# # Environment variables:
10
10
# # MIRI_LIB_SRC: The path to the Rust library directory (`library`).
11
- # # Defaults to `$(rustc --print sysroot)/lib/rustlib/src/rust/library`.
11
+ # # Defaults to `$(miri --print sysroot)/lib/rustlib/src/rust/library`.
12
12
13
13
CRATE=${1:- }
14
14
if [[ -z " $CRATE " ]]; then
18
18
shift
19
19
20
20
# compute the library directory (and export for Miri)
21
- MIRI_LIB_SRC=${MIRI_LIB_SRC:- $(rustc --print sysroot)/ lib/ rustlib/ src/ rust/ library}
21
+ MIRI_LIB_SRC=${MIRI_LIB_SRC:- $(MIRI_BE_RUSTC=host miri --print sysroot)/ lib/ rustlib/ src/ rust/ library}
22
22
if ! test -d " $MIRI_LIB_SRC /core" ; then
23
23
echo " Rust source dir ($MIRI_LIB_SRC ) does not contain a 'core' subdirectory."
24
24
echo " Set MIRI_LIB_SRC to the Rust source directory, or install the rust-src component."
@@ -33,7 +33,7 @@ rm -f library
33
33
ln -s " $MIRI_LIB_SRC " library
34
34
35
35
# use the rust-src lockfile
36
- cp " $( rustc --print sysroot ) /lib/rustlib/src/rust /Cargo.lock" Cargo.lock
36
+ cp " $MIRI_LIB_SRC /.. /Cargo.lock" Cargo.lock
37
37
38
38
# run test
39
39
cd ./${CRATE} _miri_test
You can’t perform that action at this time.
0 commit comments