From fafc8b1dfc921d2a999f18f12a0b16a27a5f5d29 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Wed, 27 Jul 2022 14:14:34 +0300 Subject: [PATCH] LLD is not needed to build Mesa3D OpenCL stack --- buildscript/modules/libclc.cmd | 3 +-- buildscript/modules/llvm.cmd | 6 +++--- buildscript/modules/mesa3d.cmd | 3 +-- releasenotes.md | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/buildscript/modules/libclc.cmd b/buildscript/modules/libclc.cmd index f39b758c..09c317c6 100644 --- a/buildscript/modules/libclc.cmd +++ b/buildscript/modules/libclc.cmd @@ -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): diff --git a/buildscript/modules/llvm.cmd b/buildscript/modules/llvm.cmd index 375b9ab2..47f10275 100644 --- a/buildscript/modules/llvm.cmd +++ b/buildscript/modules/llvm.cmd @@ -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. @@ -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 diff --git a/buildscript/modules/mesa3d.cmd b/buildscript/modules/mesa3d.cmd index 9d939c46..4d0c4c12 100644 --- a/buildscript/modules/mesa3d.cmd +++ b/buildscript/modules/mesa3d.cmd @@ -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 diff --git a/releasenotes.md b/releasenotes.md index 616ef70b..6eb63f58 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -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