aboutsummaryrefslogtreecommitdiff
path: root/etc/environments/default-clang.bat
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-15 10:54:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-15 10:54:45 +0200
commita4c0078cabe614c9ae1b99d67b67ec55413d8199 (patch)
tree7eebcda485276d58b1499a36731b49c6f55a7008 /etc/environments/default-clang.bat
parent01a2c9fa82915628d333b00461c3003fa98fa1a6 (diff)
Update MSVC and Clang environments now that we can do prompt-less
Diffstat (limited to 'etc/environments/default-clang.bat')
-rw-r--r--etc/environments/default-clang.bat13
1 files changed, 8 insertions, 5 deletions
diff --git a/etc/environments/default-clang.bat b/etc/environments/default-clang.bat
index c5929d5..5c03fbe 100644
--- a/etc/environments/default-clang.bat
+++ b/etc/environments/default-clang.bat
@@ -14,9 +14,9 @@ rem
set "C=clang"
set "CXX=clang++"
-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 If the MSVC and VCVARS variables are set, then set up the environment
+rem via the MSVC command prompt rather than letting Clang find some default
+rem (note that in the latter case, clang++ should be in PATH).
rem
rem Note also that MSVC_VER must always be set.
@@ -39,6 +39,7 @@ setlocal EnableExtensions EnableDelayedExpansion
rem Based on target determine what we are building.
rem
+set "VCVARS="
set "MODE="
if "_%1_" == "_x86_64-microsoft-win32-msvc%MSVC_VER%_" (
set "VCVARS=%VCVARS64%"
@@ -59,8 +60,10 @@ if "_%1_" == "_x86_64-microsoft-win32-msvc%MSVC_VER%_" (
)
if not "_%MSVC%_" == "__" (
- call "%MSVC%\%VCVARS%"
- if errorlevel 1 goto error
+ if not "_%VCVARS%_" == "__" (
+ call "%MSVC%\%VCVARS%"
+ if errorlevel 1 goto error
+ )
)
%2 %3 %4 %5 %6 %7 %8 %9 cc config.c=%C% config.cxx=%CXX% %MODE%