From 5d71528e4dc614be312e5f9565bbe67d3292efc7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 25 Nov 2021 17:35:14 -0500 Subject: [PATCH] hack to work around RA quirk --- cargo-miri/miri | 3 +++ miri | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100755 cargo-miri/miri diff --git a/cargo-miri/miri b/cargo-miri/miri new file mode 100755 index 00000000000..ed8c80b33fd --- /dev/null +++ b/cargo-miri/miri @@ -0,0 +1,3 @@ +#!/bin/sh +# Hack to work around https://github.com/rust-analyzer/rust-analyzer/issues/10793. +exec "$(dirname "$0")"/../miri "$@" diff --git a/miri b/miri index 337b2a496de..4be1d5bc78f 100755 --- a/miri +++ b/miri @@ -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."