From 8d3b576825263cdec5242a5f927e189ec2f243ef Mon Sep 17 00:00:00 2001 From: pal1000 Date: Sat, 20 Mar 2021 21:43:04 +0200 Subject: [PATCH] MSVC build: Switch LLVM discovery method from config tool to cmake --- buildinfo/mingw.txt | 50 +++++++++--------------- buildinfo/msvc.txt | 12 +++--- buildscript/modules/llvm.cmd | 6 +-- buildscript/modules/mesa3d.cmd | 5 ++- buildscript/modules/mesonsubprojects.cmd | 2 +- buildscript/modules/msyspackages.cmd | 2 +- releasenotes.md | 3 ++ 7 files changed, 36 insertions(+), 44 deletions(-) diff --git a/buildinfo/mingw.txt b/buildinfo/mingw.txt index 507abb69..96115469 100644 --- a/buildinfo/mingw.txt +++ b/buildinfo/mingw.txt @@ -2,15 +2,15 @@ Build environment ----------------- Windows 10.0.19042 Ressource Hacker 5.1.8.360 -7-Zip 21.00 ultra compression -Git 2.30.2.1 +7-Zip 21.01 ultra compression +Git 2.31.0.1 MSYS2 environment ----------------- base 2020.12-1 bash 5.1.004-1 bash-completion 2.11-1 -bison 3.7.4-1 +bison 3.7.6-1 brotli 1.0.9-1 bsdtar 3.5.1-1 bzip2 1.0.8-2 @@ -71,7 +71,7 @@ libpcre 8.44-1 libpcre2_8 10.36-1 libpsl 0.21.1-2 libreadline 8.1.0-1 -libsqlite 3.34.0-1 +libsqlite 3.35.2-1 libssh2 1.9.0-1 libtasn1 4.16.0-1 libunistring 0.9.10-1 @@ -83,7 +83,7 @@ m4 1.4.18-2 mingw-w64-i686-binutils 2.36.1-1 mingw-w64-i686-bzip2 1.0.8-2 mingw-w64-i686-ca-certificates 20200601-2 -mingw-w64-i686-clang 11.0.0-7 +mingw-w64-i686-clang 11.0.0-8 mingw-w64-i686-crt-git 9.0.0.6128.07922837-1 mingw-w64-i686-expat 2.2.10-1 mingw-w64-i686-gcc 10.2.0-9 @@ -99,7 +99,7 @@ mingw-w64-i686-libsystre 1.0.1-4 mingw-w64-i686-libtasn1 4.16.0-1 mingw-w64-i686-libtre-git r128.6fb7206-2 mingw-w64-i686-libwinpthread-git 9.0.0.6128.07922837-2 -mingw-w64-i686-llvm 11.0.0-7 +mingw-w64-i686-llvm 11.0.0-8 mingw-w64-i686-meson 0.57.1-1 mingw-w64-i686-mpc 1.2.1-1 mingw-w64-i686-mpdecimal 2.5.0-1 @@ -110,26 +110,20 @@ mingw-w64-i686-openssl 1.1.1.j-1 mingw-w64-i686-p11-kit 0.23.22-1 mingw-w64-i686-pkgconf 1.7.3-6 mingw-w64-i686-python 3.8.8-2 -mingw-w64-i686-python-appdirs 1.4.4-1 -mingw-w64-i686-python-attrs 20.3.0-1 mingw-w64-i686-python-beaker 1.11.0-1 mingw-w64-i686-python-mako 1.1.4-1 mingw-w64-i686-python-markupsafe 1.1.1-1 -mingw-w64-i686-python-ordered-set 3.1.1-1 -mingw-w64-i686-python-packaging 20.9-1 -mingw-w64-i686-python-pyparsing 2.4.7-1 -mingw-w64-i686-python-setuptools 54.1.1-1 -mingw-w64-i686-python-six 1.15.0-1 +mingw-w64-i686-python-setuptools 54.1.2-1 mingw-w64-i686-readline 8.0.004-2 mingw-w64-i686-spirv-headers 1.5.4.2-1 mingw-w64-i686-spirv-tools 2020.6-2 -mingw-w64-i686-sqlite3 3.34.1-1 +mingw-w64-i686-sqlite3 3.35.2-1 mingw-w64-i686-tcl 8.6.11-2 mingw-w64-i686-termcap 1.3.1-6 mingw-w64-i686-tk 8.6.11.1-1 -mingw-w64-i686-vulkan-headers 1.2.168-1 +mingw-w64-i686-vulkan-headers 1.2.168-2 mingw-w64-i686-vulkan-loader 1.2.166-1 -mingw-w64-i686-vulkan-validation-layers 1.2.162-1 +mingw-w64-i686-vulkan-validation-layers 1.2.162-3 mingw-w64-i686-windows-default-manifest 6.4-3 mingw-w64-i686-winpthreads-git 9.0.0.6128.07922837-2 mingw-w64-i686-xxhash 0.8.0-1 @@ -140,7 +134,7 @@ mingw-w64-i686-zstd 1.4.8-2 mingw-w64-x86_64-binutils 2.36.1-1 mingw-w64-x86_64-bzip2 1.0.8-2 mingw-w64-x86_64-ca-certificates 20200601-2 -mingw-w64-x86_64-clang 11.0.0-7 +mingw-w64-x86_64-clang 11.0.0-8 mingw-w64-x86_64-crt-git 9.0.0.6128.07922837-1 mingw-w64-x86_64-expat 2.2.10-1 mingw-w64-x86_64-gcc 10.2.0-9 @@ -156,7 +150,7 @@ mingw-w64-x86_64-libsystre 1.0.1-4 mingw-w64-x86_64-libtasn1 4.16.0-1 mingw-w64-x86_64-libtre-git r128.6fb7206-2 mingw-w64-x86_64-libwinpthread-git 9.0.0.6128.07922837-2 -mingw-w64-x86_64-llvm 11.0.0-7 +mingw-w64-x86_64-llvm 11.0.0-8 mingw-w64-x86_64-meson 0.57.1-1 mingw-w64-x86_64-mpc 1.2.1-1 mingw-w64-x86_64-mpdecimal 2.5.0-1 @@ -167,26 +161,20 @@ mingw-w64-x86_64-openssl 1.1.1.j-1 mingw-w64-x86_64-p11-kit 0.23.22-1 mingw-w64-x86_64-pkgconf 1.7.3-6 mingw-w64-x86_64-python 3.8.8-2 -mingw-w64-x86_64-python-appdirs 1.4.4-1 -mingw-w64-x86_64-python-attrs 20.3.0-1 mingw-w64-x86_64-python-beaker 1.11.0-1 mingw-w64-x86_64-python-mako 1.1.4-1 mingw-w64-x86_64-python-markupsafe 1.1.1-1 -mingw-w64-x86_64-python-ordered-set 3.1.1-1 -mingw-w64-x86_64-python-packaging 20.9-1 -mingw-w64-x86_64-python-pyparsing 2.4.7-1 -mingw-w64-x86_64-python-setuptools 54.1.1-1 -mingw-w64-x86_64-python-six 1.15.0-1 +mingw-w64-x86_64-python-setuptools 54.1.2-1 mingw-w64-x86_64-readline 8.0.004-2 mingw-w64-x86_64-spirv-headers 1.5.4.2-1 mingw-w64-x86_64-spirv-tools 2020.6-2 -mingw-w64-x86_64-sqlite3 3.34.1-1 +mingw-w64-x86_64-sqlite3 3.35.2-1 mingw-w64-x86_64-tcl 8.6.11-2 mingw-w64-x86_64-termcap 1.3.1-6 mingw-w64-x86_64-tk 8.6.11.1-1 -mingw-w64-x86_64-vulkan-headers 1.2.168-1 +mingw-w64-x86_64-vulkan-headers 1.2.168-2 mingw-w64-x86_64-vulkan-loader 1.2.166-1 -mingw-w64-x86_64-vulkan-validation-layers 1.2.162-1 +mingw-w64-x86_64-vulkan-validation-layers 1.2.162-3 mingw-w64-x86_64-windows-default-manifest 6.4-3 mingw-w64-x86_64-winpthreads-git 9.0.0.6128.07922837-2 mingw-w64-x86_64-xxhash 0.8.0-1 @@ -194,17 +182,17 @@ mingw-w64-x86_64-xz 5.2.5-2 mingw-w64-x86_64-z3 4.8.9-1 mingw-w64-x86_64-zlib 1.2.11-9 mingw-w64-x86_64-zstd 1.4.8-2 -mintty 1~3.4.5-1 +mintty 1~3.4.7-2 mpfr 4.1.0-1 msys2-keyring 1~20210213-1 msys2-launcher 1.0-1 -msys2-runtime 3.1.7-4 +msys2-runtime 3.1.7-6 nano 5.6.1-1 ncurses 6.2-1 nettle 3.7-1 openssl 1.1.1.i-1 p11-kit 0.23.22-2 -pacman 5.2.2-12 +pacman 5.2.2-13 pacman-contrib 1.4.0-1 pacman-mirrors 20210227-1 patch 2.7.6-1 diff --git a/buildinfo/msvc.txt b/buildinfo/msvc.txt index 11b2779b..1c77831d 100644 --- a/buildinfo/msvc.txt +++ b/buildinfo/msvc.txt @@ -2,9 +2,9 @@ Build environment ----------------- Windows 10.0.19042 Ressource Hacker 5.1.8.360 -7-Zip 21.00 ultra compression -Git 2.30.2.1 -Visual Studio Community 2019 v16.9.1 +7-Zip 21.01 ultra compression +Git 2.31.0.1 +Visual Studio Community 2019 v16.9.2 Windows SDK 10.0.19041.0 Python 3.9.2 @@ -14,12 +14,12 @@ Mako 1.1.4 MarkupSafe 1.1.1 meson 0.57.1 pip 21.0.1 -setuptools 54.1.1 +setuptools 54.1.2 -CMake 3.19.6 +CMake 3.19.7 Ninja 1.10.2 LLVM 11.1.0 Winflexbison package 2.5.24 flex 2.6.4 Bison 3.7.4 -pkgconf 1.7.3 +pkgconf 1.7.4 diff --git a/buildscript/modules/llvm.cmd b/buildscript/modules/llvm.cmd index 547e24d2..5556e26e 100644 --- a/buildscript/modules/llvm.cmd +++ b/buildscript/modules/llvm.cmd @@ -2,7 +2,7 @@ @rem Check lf LLVM binaries are available @set llvmbinaries=0 -@IF EXIST %devroot%\llvm\%abi%\bin IF EXIST %devroot%\llvm\%abi%\include IF EXIST %devroot%\llvm\%abi%\lib set llvmbinaries=1 +@IF EXIST %devroot%\llvm\%abi%\include IF EXIST %devroot%\llvm\%abi%\lib set llvmbinaries=1 @rem Check lf LLVM sources are available or obtainable @set llvmsources=1 @@ -29,7 +29,7 @@ @rem Getting LLVM monorepo if LLVM source is missing @if NOT EXIST %devroot%\llvm\cmake if NOT EXIST %devroot%\llvm-project ( @echo Getting LLVM source code... -@git clone https://github.com/llvm/llvm-project.git --branch=llvmorg-11.0.1 --depth=1 %devroot%\llvm-project +@git clone https://github.com/llvm/llvm-project.git --branch=llvmorg-11.1.0 --depth=1 %devroot%\llvm-project @echo. ) @@ -93,7 +93,7 @@ @pause @echo. @if /I NOT "%ninja%"=="y" cmake --build . -j %throttle% --config Release --target install -@if /I "%ninja%"=="y" call %devroot%\%projectname%\buildscript\modules\ninjallvmbuild.cmd +@if /I "%ninja%"=="y" ninja -j %throttle% install-llvm-libraries install-llvm-headers install-cmake-exports tools/install utils/TableGen/install :skipllvm @echo. diff --git a/buildscript/modules/mesa3d.cmd b/buildscript/modules/mesa3d.cmd index 0a3a2815..9f08da4e 100644 --- a/buildscript/modules/mesa3d.cmd +++ b/buildscript/modules/mesa3d.cmd @@ -94,7 +94,7 @@ @IF %abi%==x64 set buildcmd=msbuild /p^:Configuration=release,Platform=x64 mesa.sln /m^:%throttle% @set havellvm=0 -@IF %toolchain%==msvc IF EXIST %devroot%\llvm\%abi% set havellvm=1 +@IF %toolchain%==msvc IF EXIST %devroot%\llvm\%abi% IF %cmakestate% GTR 0 set havellvm=1 @IF NOT %toolchain%==msvc set havellvm=1 @set llvmless=n @if %havellvm%==0 set llvmless=y @@ -103,7 +103,8 @@ @call %devroot%\%projectname%\buildscript\modules\mesonsubprojects.cmd @if /I NOT "%llvmless%"=="y" IF %llvmconfigbusted% EQU 1 set buildconf=%buildconf% --force-fallback-for=llvm @if /I NOT "%llvmless%"=="y" set buildconf=%buildconf% -Dllvm=%mesonbooltrue% -Dshared-llvm=%mesonboolfalse% -@if /I NOT "%llvmless%"=="y" IF %toolchain%==msvc SET PATH=%devroot%\llvm\%abi%\bin\;%PATH% +@if /I NOT "%llvmless%"=="y" IF %toolchain%==msvc set buildconf=%buildconf% --cmake-prefix-path=%devroot:\=/%/llvm/%abi% +@if /I NOT "%llvmless%"=="y" IF %toolchain%==msvc IF %cmakestate% EQU 1 SET PATH=%devroot%\cmake\bin\;%PATH% @if /I "%llvmless%"=="y" set buildconf=%buildconf% -Dllvm=%mesonboolfalse% @set useninja=n diff --git a/buildscript/modules/mesonsubprojects.cmd b/buildscript/modules/mesonsubprojects.cmd index a965cdcc..73901004 100644 --- a/buildscript/modules/mesonsubprojects.cmd +++ b/buildscript/modules/mesonsubprojects.cmd @@ -3,7 +3,7 @@ :llvmwrap @set RTTI=false @set llvmconfigbusted=0 -@IF %toolchain%==msvc if /I NOT "%llvmless%"=="y" FOR /F "tokens=* USEBACKQ" %%a IN (`%devroot%\llvm\%abi%\bin\llvm-config --has-rtti`) DO @IF /I "%%a"=="YES" SET RTTI=true +@IF %toolchain%==msvc if /I NOT "%llvmless%"=="y" SET RTTI=true @IF NOT %toolchain%==msvc if /I NOT "%llvmless%"=="y" FOR /F "tokens=* USEBACKQ" %%a IN (`%msysloc%\usr\bin\bash --login -c "${MINGW_PREFIX}/bin/llvm-config --has-rtti" 2^>^&1`) DO @( IF /I "%%a"=="YES" SET RTTI=true IF /I NOT "%%a"=="YES" IF /I NOT "%%a"=="NO" set llvmconfigbusted=1 diff --git a/buildscript/modules/msyspackages.cmd b/buildscript/modules/msyspackages.cmd index 45a5535d..f42aba06 100644 --- a/buildscript/modules/msyspackages.cmd +++ b/buildscript/modules/msyspackages.cmd @@ -13,4 +13,4 @@ IF /I NOT "%%a"=="error" IF %gitstate% GTR 0 echo. ) @%msysloc%\usr\bin\bash --login -c "/usr/bin/pacman -Sc --noconfirm" @echo. -@endlocal&set flexstate=2&set ninjastate=2&set pkgconfigstate=1 \ No newline at end of file +@endlocal&set flexstate=2&set ninjastate=2&set pkgconfigstate=1&set cmakestate=0 \ No newline at end of file diff --git a/releasenotes.md b/releasenotes.md index 0e1acf1b..b5985948 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -1,3 +1,6 @@ +# Next release +### Build script +- MSVC build: Switch LLVM discovery method from config tool to cmake. # 21.0.0 - Updated Mesa3D to [21.0.0](https://docs.mesa3d.org/relnotes/21.0.0.html). ### Debug