about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRoss Smyth <crs2017@gmail.com>2024-02-23 19:09:46 -0500
committerRoss Smyth <crs2017@gmail.com>2024-02-24 11:16:15 -0500
commitc7be4439ade7cd4b1e506bd87f2c9b131c6d594e (patch)
tree4346467c7a9acd469ac0b4910c12fb89d433b869 /src
parent3815fc06256f6281ee064fc607d24020dc96f05b (diff)
downloadrust-c7be4439ade7cd4b1e506bd87f2c9b131c6d594e.tar.gz
rust-c7be4439ade7cd4b1e506bd87f2c9b131c6d594e.zip
Windows miri-script execution egronomics
This allows for Windows users to use miri-script without pain
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/miri.bat10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/miri/miri.bat b/src/tools/miri/miri.bat
new file mode 100644
index 00000000000..91e8a6e8f3b
--- /dev/null
+++ b/src/tools/miri/miri.bat
@@ -0,0 +1,10 @@
+:: This makes execution of ./miri on Linux and Windows the same.
+:: Windows will not execute the bash script, and select this.
+@echo off
+set MIRI_SCRIPT_TARGET_DIR=%0\..\miri-script\target
+cargo build %CARGO_EXTRA_FLAGS% -q --target-dir %MIRI_SCRIPT_TARGET_DIR% --manifest-path %0\..\miri-script\Cargo.toml
+
+:: Forwards all arguments to this file to the executable.
+:: We invoke the binary directly to avoid going through rustup, which would set some extra
+:: env vars that we do not want.
+%MIRI_SCRIPT_TARGET_DIR%\debug\miri-script %*