Skip to content

Commit

Permalink
Windows miri-script execution egronomics
Browse files Browse the repository at this point in the history
This allows for Windows users to use miri-script without pain
  • Loading branch information
RossSmyth committed Feb 24, 2024
1 parent 61af956 commit c5872cb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions miri.bat
Original file line number Diff line number Diff line change
@@ -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 %*

0 comments on commit c5872cb

Please sign in to comment.