summary refs log tree commit diff stats
path: root/build_all.bat
diff options
context:
space:
mode:
Diffstat (limited to 'build_all.bat')
-rw-r--r--build_all.bat32
1 files changed, 22 insertions, 10 deletions
diff --git a/build_all.bat b/build_all.bat
index 7967e2584..ef4a5f6a4 100644
--- a/build_all.bat
+++ b/build_all.bat
@@ -1,17 +1,29 @@
 @echo off
-rem build development version of the compiler; can be rerun safely
-if not exist csources (
-  git clone --depth 1 https://github.com/nim-lang/csources.git
+rem DO NO EDIT DIRECTLY! auto-generated by `nim r tools/ci_generate.nim`
+rem Build development version of the compiler; can be rerun safely
+rem bare bones version of ci/funs.sh adapted for windows.
+
+rem Read in some common shared variables (shared with other tools),
+rem see https://stackoverflow.com/questions/3068929/how-to-read-file-contents-into-a-variable-in-a-batch-file
+for /f "delims== tokens=1,2" %%G in (config/build_config.txt) do set %%G=%%H
+SET nim_csources=bin\nim_csources_%nim_csourcesHash%.exe
+echo "building from csources: %nim_csources%"
+
+if not exist %nim_csourcesDir% (
+  git clone -q --depth 1 -b %nim_csourcesBranch% %nim_csourcesUrl% %nim_csourcesDir%
 )
-if not exist bin\nim.exe (
-  cd csources
-  if PROCESSOR_ARCHITECTURE == AMD64 (
+
+if not exist %nim_csources% (
+  cd %nim_csourcesDir%
+  git checkout %nim_csourcesHash%
+  echo "%PROCESSOR_ARCHITECTURE%"
+  if "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
     SET ARCH=64
   )
   CALL build.bat
   cd ..
+  copy /y bin\nim.exe  %nim_csources%
 )
-bin\nim.exe c --skipUserCfg --skipParentCfg koch
-koch.exe boot -d:release --skipUserCfg --skipParentCfg
-koch.exe tools --skipUserCfg --skipParentCfg
-
+ bin\nim.exe c --noNimblePath --skipUserCfg --skipParentCfg --hints:off koch
+ koch boot -d:release --skipUserCfg --skipParentCfg --hints:off
+ koch tools --skipUserCfg --skipParentCfg --hints:off