aboutsummaryrefslogtreecommitdiff
path: root/etc/bootstrap
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-07 14:57:39 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-07 14:57:39 +0200
commit1967d67234b79ca7555a4dddda2b4761b10de250 (patch)
treee8e6a7ada4139d0c2b59e751e5bcc3d39ac7069f /etc/bootstrap
parentb6e555163b0fed313282f193f3aa20318ad70c07 (diff)
Add bootstrap/environment batch files for Clang targeting MSVC
Diffstat (limited to 'etc/bootstrap')
-rw-r--r--etc/bootstrap/bbot-bootstrap-clang.bat (renamed from etc/bootstrap/bbot-bootstrap-msvc-15.bat)40
-rw-r--r--etc/bootstrap/bbot-bootstrap-mingw.bat3
-rw-r--r--etc/bootstrap/bbot-bootstrap-msvc.bat (renamed from etc/bootstrap/bbot-bootstrap-msvc-16.bat)7
3 files changed, 31 insertions, 19 deletions
diff --git a/etc/bootstrap/bbot-bootstrap-msvc-15.bat b/etc/bootstrap/bbot-bootstrap-clang.bat
index 71c6de2..5b7f52e 100644
--- a/etc/bootstrap/bbot-bootstrap-msvc-15.bat
+++ b/etc/bootstrap/bbot-bootstrap-clang.bat
@@ -1,14 +1,22 @@
@echo off
-rem file : etc/bootstrap/bbot-bootstrap-msvc-15.bat
+rem file : etc/bootstrap/bbot-bootstrap-clang.bat
rem copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
rem license : TBC; see accompanying LICENSE file
setlocal EnableExtensions EnableDelayedExpansion
-set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
-set "VCVARS=%MSVC%\VC\Auxiliary\Build\vcvars64.bat"
+rem If the MSVC variable is set, then set up the environment via the MSVC
+rem command prompt rather than letting Clang find some default (note that
+rem in the latter case, clang++ should be in PATH).
+rem set "MSVC="
+rem set "VCVARS="
+
+set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
+set "VCVARS=VC\Auxiliary\Build\vcvars64.bat"
+
+set "CXX=clang++"
set "BUILD=C:\tmp"
set "INSTALL=C:\build2"
set "BOOTSTRAP=C:\bootstrap"
@@ -28,10 +36,12 @@ if exist %INSTALL%\bin\bbot-worker.exe (
goto end
)
-rem Setup the compiler for the toolchain.
+rem Setup the MSVC environment.
rem
-call "%VCVARS%"
-if errorlevel 1 goto error
+if not "_%MSVC%_" == "__" (
+ call "%MSVC%\%VCVARS%"
+ if errorlevel 1 goto error
+)
rem Use bootstrap tools.
rem
@@ -111,15 +121,23 @@ del trust
@rem
+@rem Switch to the bootstrapped utilities/toolchain.
+@rem
+@set "PATH=%INSTALL%\bin;%PATH%"
+
+
+@rem
@rem Bootstrap and install the toolchain.
@rem
@for /D %%d in (build2-toolchain-*) do set "bstrap=%%d"
cd %bstrap%
+@rem Bootstrap in parallel using GNU make (which is part of baseutils).
+@rem
@rem Note: executing in a separate cmd.exe to preserve the echo mode.
@rem
-cmd /C build-msvc.bat --timeout %TIMEOUT% --install-dir %INSTALL%^
- --trust %trust%
+cmd /C build-mingw.bat --make mingw32-make --make -j%NUMBER_OF_PROCESSORS%^
+ --timeout %TIMEOUT% --install-dir %INSTALL% --trust %trust% %CXX%
@if errorlevel 1 goto error
cd ..
@@ -128,12 +146,6 @@ rmdir /S /Q %bstrap%
@rem
-@rem Switch to the bootstrapped utilities/toolchain.
-@rem
-@set "PATH=%INSTALL%\bin;%PATH%"
-
-
-@rem
@rem Build and install the bbot worker.
@rem
@for /D %%d in (build2-toolchain-*) do set "config=%%d"
diff --git a/etc/bootstrap/bbot-bootstrap-mingw.bat b/etc/bootstrap/bbot-bootstrap-mingw.bat
index e1496cc..ef87ec7 100644
--- a/etc/bootstrap/bbot-bootstrap-mingw.bat
+++ b/etc/bootstrap/bbot-bootstrap-mingw.bat
@@ -131,8 +131,7 @@ del trust
@for /D %%d in (build2-toolchain-*) do set "bstrap=%%d"
cd %bstrap%
-@rem Bootstrap in parallel using GNU make (which is part of our mingw
-@rem toolchain).
+@rem Bootstrap in parallel using GNU make (which is part of baseutils).
@rem
@rem Note: executing in a separate cmd.exe to preserve the echo mode.
@rem
diff --git a/etc/bootstrap/bbot-bootstrap-msvc-16.bat b/etc/bootstrap/bbot-bootstrap-msvc.bat
index 6091fff..37eae21 100644
--- a/etc/bootstrap/bbot-bootstrap-msvc-16.bat
+++ b/etc/bootstrap/bbot-bootstrap-msvc.bat
@@ -1,13 +1,14 @@
@echo off
-rem file : etc/bootstrap/bbot-bootstrap-msvc-16.bat
+rem file : etc/bootstrap/bbot-bootstrap-msvc.bat
rem copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
rem license : TBC; see accompanying LICENSE file
setlocal EnableExtensions EnableDelayedExpansion
+rem set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community"
set "MSVC=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
-set "VCVARS=%MSVC%\VC\Auxiliary\Build\vcvars64.bat"
+set "VCVARS=VC\Auxiliary\Build\vcvars64.bat"
set "BUILD=C:\tmp"
set "INSTALL=C:\build2"
@@ -30,7 +31,7 @@ if exist %INSTALL%\bin\bbot-worker.exe (
rem Setup the compiler for the toolchain.
rem
-call "%VCVARS%"
+call "%MSVC%\%VCVARS%"
if errorlevel 1 goto error
rem Use bootstrap tools.