Skip to content

Commit

Permalink
hack to work around RA quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 25, 2021
1 parent 4f0faed commit fa0af11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cargo-miri/miri
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# Hack to work around https://github.com/rust-analyzer/rust-analyzer/issues/10793.
cd "$(dirname "$0")"/..
exec ./miri "$@"
5 changes: 3 additions & 2 deletions miri
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ EOF
TARGET=$(rustc --version --verbose | grep "^host:" | cut -d ' ' -f 2)
SYSROOT=$(rustc --print sysroot)
LIBDIR=$SYSROOT/lib/rustlib/$TARGET/lib
MIRIDIR=$(dirname "$0")
if readlink -e . &>/dev/null; then
# This platform supports `readlink -e`.
MIRIDIR=$(readlink -e "$MIRIDIR")
MIRIDIR=$(dirname "$(readlink -e "$0")")
else
MIRIDIR=$(dirname "$0")
fi
if ! test -d "$LIBDIR"; then
echo "Something went wrong determining the library dir."
Expand Down

0 comments on commit fa0af11

Please sign in to comment.