diff options
Diffstat (limited to 'etc/environments/default-clang.bat')
-rw-r--r-- | etc/environments/default-clang.bat | 13 |
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% |