Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hack to work around RA quirk #1924

Merged
merged 1 commit into from
Nov 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cargo-miri/miri
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
# Hack to work around https://github.com/rust-analyzer/rust-analyzer/issues/10793.
exec "$(dirname "$0")"/../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