Skip to content

Commit

Permalink
LLD is not needed to build Mesa3D OpenCL stack
Browse files Browse the repository at this point in the history
  • Loading branch information
pal1000 committed Jul 27, 2022
1 parent bf1b46a commit fafc8b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
3 changes: 1 addition & 2 deletions buildscript/modules/libclc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
@if %ninjastate% EQU 1 set PATH=%devroot%\ninja\;%PATH%
@if NOT EXIST "%devroot%\llvm\build\spv-%hostabi%\bin\llvm-spirv.exe" set canclc=0
@if NOT EXIST "%devroot%\llvm\build\%hostabi%\bin\clang.exe" set canclc=0
@if NOT EXIST "%devroot%\llvm\build\%hostabi%\bin\lld.exe" set canclc=0
@if NOT EXIST "%devroot%\llvm-project\" set canclc=0
@if %canclc% EQU 0 echo libclc requires cmake, ninja and %hostabi% LLVM build with clang, LLD and SPIRV translator.
@if %canclc% EQU 0 echo libclc requires cmake, ninja and %hostabi% LLVM build with clang and SPIRV translator.
@if %canclc% EQU 0 echo.
@if %canclc% EQU 0 GOTO finishclc
@if %canclc% EQU 1 set /p buildclc=Build LLVM libclc project (y/n):
Expand Down
6 changes: 3 additions & 3 deletions buildscript/modules/llvm.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
@rem set /p amdgpu=Build AMDGPU target - required by RADV (y/n):
@rem echo.

@rem Clang and LLD
@if EXIST "%devroot%\llvm-project\" set /p buildclang=Build clang and LLD - required for OpenCL (y/n):
@rem Clang
@if EXIST "%devroot%\llvm-project\" set /p buildclang=Build clang - required for OpenCL (y/n):
@if EXIST "%devroot%\llvm-project\" echo.

@rem Load cmake into build environment.
Expand All @@ -65,7 +65,7 @@
@if /I "%ninja%"=="y" set buildconf=%buildconf%Ninja
@set buildconf=%buildconf% -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT
@if EXIST "%devroot%\llvm-project\" IF /I NOT "%buildclang%"=="y" set buildconf=%buildconf% -DLLVM_ENABLE_PROJECTS=""
@IF /I "%buildclang%"=="y" set buildconf=%buildconf% -DLLVM_ENABLE_PROJECTS="clang;lld"
@IF /I "%buildclang%"=="y" set buildconf=%buildconf% -DLLVM_ENABLE_PROJECTS="clang"
@set buildconf=%buildconf% -DLLVM_TARGETS_TO_BUILD=
@IF /I "%amdgpu%"=="y" set buildconf=%buildconf%AMDGPU;
@set buildconf=%buildconf%X86 -DLLVM_OPTIMIZED_TABLEGEN=TRUE -DLLVM_INCLUDE_UTILS=OFF -DLLVM_INCLUDE_RUNTIMES=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_INCLUDE_GO_TESTS=OFF -DLLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_BUILD_LLVM_C_DYLIB=OFF -DLLVM_ENABLE_DIA_SDK=OFF
Expand Down
3 changes: 1 addition & 2 deletions buildscript/modules/mesa3d.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,10 @@
@IF NOT EXIST "%devroot%\llvm\build\clc\share\pkgconfig\" set canopencl=0
@IF %intmesaver% GEQ 21300 IF EXIST "%devroot%\llvm\build\%abi%\lib\LLVMAMDGPU*.lib" if /I NOT "%radv%"=="y" set canopencl=0

@rem OpenCL SPIR-V requirements: basic support + Clang, LLD, LLVM SPIRV translator and SPIRV tools
@rem OpenCL SPIR-V requirements: basic OpenCL support + Clang, LLVM SPIRV translator and SPIRV tools
@set canclspv=1
@IF %canopencl% EQU 0 set canclspv=0
@IF NOT EXIST "%devroot%\llvm\build\%abi%\lib\clang*.lib" set canclspv=0
@IF NOT EXIST "%devroot%\llvm\build\%abi%\lib\lld*.lib" set canclspv=0
@IF NOT EXIST "%devroot%\llvm\build\spv-%abi%\lib\pkgconfig\" set canclspv=0
@IF NOT EXIST "%devroot%\spirv-tools\build\%abi%\lib\pkgconfig\" set canclspv=0

Expand Down
3 changes: 2 additions & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
- Disable draw with LLVM if LLVM native module ends being unused but needed, workaround for [upstream issue 6817](https://gitlab.freedesktop.org/mesa/mesa/-/issues/6817);
- Add [control mechanism](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17431) for [Futex](https://en.wikipedia.org/wiki/Futex) usage [22.2+];
- clover: Allow using [LLVM lacking RTTI](https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17055) [22.0+ MSVC/22.2+ MinGW];
- Require swrast to build swr otherwise swrast, tessts and radv disabling would pull out draw with LLVM which swr requires.
- Require swrast to build swr otherwise swrast, tessts and radv disabling would pull out draw with LLVM which swr requires;
- LLD is not needed to build Mesa3D OpenCL stack.
# 22.1.4
- Updated Mesa3D to [22.1.4](https://docs.mesa3d.org/relnotes/22.1.4.html).
### Build script
Expand Down

0 comments on commit fafc8b1

Please sign in to comment.