-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MSVC: Support using clang build used by clc to build whole Mesa
- Loading branch information
Showing
3 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
@rem Detect clang | ||
@setlocal | ||
@set clangstate=0 | ||
@IF %toolchain%==msvc IF EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set clangstate=1 | ||
@IF %toolchain%==msvc IF %abi%==x64 IF EXIST "%ProgramFiles%\LLVM\bin\clang-cl.exe" set clangstate=1 | ||
@IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==AMD64 IF EXIST "%ProgramFiles% (x86)\LLVM\bin\clang-cl.exe" set clangstate=1 | ||
@IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==x86 IF EXIST "%ProgramFiles%\LLVM\bin\clang-cl.exe" set clangstate=1 | ||
@IF %toolchain%==msvc set clangstate=0 | ||
@IF NOT %toolchain%==msvc set clangstate=1 | ||
|
||
@set useclang=n | ||
@IF %clangstate% GTR 0 set /p useclang=Use clang compiler with selected toolchain ^(y/n^): | ||
@IF %clangstate% GTR 0 echo. | ||
@endlocal&set useclang=%useclang% | ||
|
||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x64 set PATH=%ProgramFiles%\LLVM\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==AMD64 set PATH=%ProgramFiles% (x86)\LLVM\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==x86 set PATH=%ProgramFiles%\LLVM\bin\;%PATH% | ||
@set llvmalreadyloaded=0 | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set PATH=%devroot%\llvm\build\%abi%\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set llvmalreadyloaded=1 | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x64 IF NOT EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set PATH=%ProgramFiles%\LLVM\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==AMD64 IF NOT EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set PATH=%ProgramFiles% (x86)\LLVM\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc IF %abi%==x86 IF /I %PROCESSOR_ARCHITECTURE%==x86 IF NOT EXIST "%devroot%\llvm\build\%abi%\bin\clang-cl.exe" set PATH=%ProgramFiles%\LLVM\bin\;%PATH% | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc set CC=clang-cl.exe | ||
@if /I "%useclang%"=="y" IF %toolchain%==msvc set CXX=clang-cl.exe | ||
@if /I "%useclang%"=="y" IF NOT %toolchain%==msvc set MSYSTEM=CLANG%MSYSTEM:~-2% | ||
@if /I "%useclang%"=="y" IF NOT %toolchain%==msvc set LMSYSTEM=clang%MSYSTEM:~-2% | ||
@if /I "%useclang%"=="y" IF NOT %toolchain%==msvc set toolchain=clang | ||
@if /I "%useclang%"=="y" set TITLE=%TITLE% with clang compiler | ||
@if /I "%useclang%"=="y" TITLE %TITLE% | ||
@if /I "%useclang%"=="y" TITLE %TITLE% | ||
@set useclang= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters