File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 33
33
)
34
34
35
35
# # Preparation
36
- # I'd love to use `jq` for parsing the JSON properly, but macOS is totally underequipped for this kind of work.
37
- TARGET=$( rustc --print target-spec-json -Z unstable-options | grep llvm-target | cut -d ' "' -f 4)
36
+ TARGET=$( rustc --version --verbose | grep " ^host:" | cut -d ' ' -f 2)
38
37
SYSROOT=$( rustc --print sysroot)
38
+ LIBDIR=$SYSROOT /lib/rustlib/$TARGET /lib
39
+ if ! test -d " $LIBDIR " ; then
40
+ echo " Something went wrong determining the library dir."
41
+ echo " I got $LIBDIR but that does not exist."
42
+ echo " Please report a bug at https://github.com/rust-lang/miri/issues."
43
+ exit 2
44
+ fi
39
45
# We set the rpath so that Miri finds the private rustc libraries it needs.
40
46
# We enable debug-assertions to get tracing.
41
47
# We enable line-only debuginfo for backtraces.
42
- export RUSTFLAGS=" -C link-args=-Wl,-rpath,$SYSROOT /lib/rustlib/ $TARGET /lib -C debug-assertions -C debuginfo=1"
48
+ export RUSTFLAGS=" -C link-args=-Wl,-rpath,$LIBDIR -C debug-assertions -C debuginfo=1"
43
49
44
50
# # Helper functions
45
51
You can’t perform that action at this time.
0 commit comments