about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--y.cmd9
-rw-r--r--y.ps112
2 files changed, 21 insertions, 0 deletions
diff --git a/y.cmd b/y.cmd
new file mode 100644
index 00000000000..e9b688645a4
--- /dev/null
+++ b/y.cmd
@@ -0,0 +1,9 @@
+@echo off
+echo [BUILD] build system >&2
+mkdir build 2>nul
+rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021 || goto :error
+build\y.exe %* || goto :error
+goto :EOF
+
+:error
+exit /b
diff --git a/y.ps1 b/y.ps1
new file mode 100644
index 00000000000..02ef0fcbd50
--- /dev/null
+++ b/y.ps1
@@ -0,0 +1,12 @@
+$ErrorActionPreference = "Stop"
+
+$host.ui.WriteErrorLine("[BUILD] build system")
+New-Item -ItemType Directory -Force -Path build | Out-Null
+& rustc build_system/main.rs -o build\y.exe -Cdebuginfo=1 --edition 2021
+if ($LASTEXITCODE -ne 0) {
+    exit $LASTEXITCODE
+}
+& build\y.exe $args
+if ($LASTEXITCODE -ne 0) {
+    exit $LASTEXITCODE
+}