Skip to content

Commit ab1f60c

Browse files
committed
comments
1 parent 6420293 commit ab1f60c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

miri

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
set -e
33
TARGET=$(rustc --print target-spec-json -Z unstable-options | jq '.["llvm-target"]' -r)
44
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.
57
export RUSTFLAGS="-C link-args=-Wl,-rpath,$SYSROOT/lib/rustlib/$TARGET/lib -C debug-assertions"
68

79
COMMAND="$1"
@@ -22,8 +24,8 @@ build|test|run)
2224
if [ -n "$MIRI_SYSROOT" ]; then
2325
# sysroot already set
2426
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
2729
true
2830
else
2931
# we have to build a sysroot

0 commit comments

Comments
 (0)