Skip to content

Commit 2f1c9db

Browse files
committed
Auto merge of rust-lang#3316 - RossSmyth:windows-script, r=RalfJung
Windows miri-script execution egronomics This allows for Windows users to use miri-script without pain. As working on miri earlier I was doing `.\miri-script\target\debug\miri-script.exe { install | build | ... }` which wasn't fun.
2 parents 40dc2b4 + c7be443 commit 2f1c9db

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/tools/miri/miri.bat

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
:: This makes execution of ./miri on Linux and Windows the same.
2+
:: Windows will not execute the bash script, and select this.
3+
@echo off
4+
set MIRI_SCRIPT_TARGET_DIR=%0\..\miri-script\target
5+
cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml
6+
7+
:: Forwards all arguments to this file to the executable.
8+
:: We invoke the binary directly to avoid going through rustup, which would set some extra
9+
:: env vars that we do not want.
10+
%MIRI_SCRIPT_TARGET_DIR%\debug\miri-script %*

0 commit comments

Comments
 (0)