Skip to content

Commit db91a41

Browse files
authored
Merge pull request rust-lang#1432 from simonbuchan/windows-y-wrappers
Add Windows wrappers for ./y
2 parents 6b82fe2 + f5a74dc commit db91a41

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

y.cmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
echo [BUILD] build system >&2
3+
mkdir build 2>nul
4+
rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021 || goto :error
5+
build\y.exe %* || goto :error
6+
goto :EOF
7+
8+
:error
9+
exit /b

y.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
$host.ui.WriteErrorLine("[BUILD] build system")
4+
New-Item -ItemType Directory -Force -Path build | Out-Null
5+
& rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021
6+
if ($LASTEXITCODE -ne 0) {
7+
exit $LASTEXITCODE
8+
}
9+
& build\y.exe $args
10+
if ($LASTEXITCODE -ne 0) {
11+
exit $LASTEXITCODE
12+
}

0 commit comments

Comments
 (0)