File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 2
2
set -e
3
3
TARGET=$( rustc --print target-spec-json -Z unstable-options | jq ' .["llvm-target"]' -r)
4
4
SYSROOT=$( rustc --print sysroot)
5
+ # We set the rpath so that Miri finds the private rustc libraries it needs.
6
+ # We enable debug-assertions to get tracing.
5
7
export RUSTFLAGS=" -C link-args=-Wl,-rpath,$SYSROOT /lib/rustlib/$TARGET /lib -C debug-assertions"
6
8
7
9
COMMAND=" $1 "
@@ -22,8 +24,8 @@ build|test|run)
22
24
if [ -n " $MIRI_SYSROOT " ]; then
23
25
# sysroot already set
24
26
true
25
- elif rustc --print sysroot | egrep -q ' build/[^/]+/stage' ; then
26
- # a local build, we have a proper libstd in $SYSROOT
27
+ elif echo " $SYSROOT " | egrep -q ' build/[^/]+/stage' ; then
28
+ # a local rustc build, assume we have a proper libstd in $SYSROOT
27
29
true
28
30
else
29
31
# we have to build a sysroot
You can’t perform that action at this time.
0 commit comments