anchor.diff:  @set vsenv=%ProgramFiles%
   @if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
   @set vsenv15=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat
  -@if EXIST "%vsenv15%" @set toolchain=Visual Studio 15 2017
  -@if NOT EXIST "%vsenv15%" @set toolchain=Visual Studio 14
   @set vsenv14=%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat
  -@if %abi%==x64 @set toolchain=%toolchain% Win64
   @set gcc=%mesa%mingw-w64-%abi%\mingw%minabi%\bin
   @set vsenvloaded=0
   @set dxtnbuilt=0
  -@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed y/n? 
  -@if /I NOT %buildllvm%==y GOTO build_dxtn
   
   :build_llvm
  +@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed (y/n):
  +@if /I NOT %buildllvm%==y GOTO build_dxtn
  +@echo.
   @cd "%mesa%llvm"
   @RD /S /Q %abi%
  +@echo.
   @RD /S /Q cmake-%abi%
  +@echo.
   @md cmake-%abi%
   @cd cmake-%abi%
  -@if EXIST "%vsenv15%" set vsenv=%vsenv15%
  -@if NOT EXIST "%vsenv15%" set vsenv=%vsenv14%
  -@set vsenvloaded=1
  -@call "%vsenv%"
  +@if EXIST "%vsenv15%" (
  +@set vsenvloaded=%vsenvloaded%15
  +@set toolchain=Visual Studio 15 2017
  +@call "%vsenv15%"
  +)
  +@if NOT EXIST "%vsenv15%" (
  +@set vsenvloaded=%vsenvloaded%14
  +@set toolchain=Visual Studio 14
  +@call "%vsenv14%"
  +)
  +@if %abi%==x64 @set toolchain=%toolchain% Win64
   @set PATH=%mesa%cmake\%abi%\bin\;%PATH%
  +@echo.
   @cmake -G "%toolchain%" -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_RTTI=1 -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=%mesa:\=/%llvm/%abi% ..
  +@echo.
   @pause
  +@echo.
   @msbuild /p:Configuration=Release INSTALL.vcxproj
  +@echo.
   @pause
  +@echo.
   
   :build_dxtn
   @if NOT EXIST "%gcc%" GOTO build_mesa
  
positive.code: pip install -r requirements.txt --upgrade
  cd $mesa
  cd mesa
  @GOTO build_mesa_exec
  
  :build_with_vs
  @if %vsenvloaded%==0 call "%vsenv14%"
  @if %vsenvloaded%==1 @set restartcond=1
  @if EXIST "%vsenv15%" @set restartcond=%restartcond%2
  @if %restartcond%==12 (
  @echo "A Visual Studio build environment is already loaded. The script will now restart to flush loaded environment.
  @pause
  @GOTO exit
  )
  
  :build_mesa_exec
  @python "%mesa%Python\%abi%\Scripts\scons.py" build=release platform=windows machine=%longabi% toolchain=%mesatoolchain% swr=%buildswr% libgl-gdi"
  @pause
  
  :exit
  
negative.code: @if /i NOT %buildmesa%==y GOTO exit
  @set LLVM=%mesa:\=/%llvm/%abi%
  @cd "%mesa%mesa"
  @set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
  @set buildswr=0
  @if /i %openswr%==y @set buildswr=1
  @set mesatoolchain=default
  @echo.
  @GOTO build_with_vs
  
  :build_with_mingw
  @set mingw=n
  @set mingwtest=0
  @if EXIST "%gcc%" @set mingwtest=1
  @set msys2=%mesa%msys64\msys2_shell.cmd
  @if EXIST "%msys2%" @set mingwtest=%mingwtest%2
  @if %mingwtest%==12 @set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio (y=yes):
  @if %dxtnbuilt%==0 @set PATH=%gcc%\;%PATH%
  @set mesatoolchain=crossmingw
  @copy "%gcc%\%altabi%-w64-mingw32-gcc-ar.exe" "%gcc%\%altabi%-w64-mingw32-ar.exe"
  @copy "%gcc%\%altabi%-w64-mingw32-gcc-ranlib.exe" "%gcc%\%altabi%-w64-mingw32-ranlib.exe"
  