Skip to content

Commit

Permalink
MSVC build: Switch LLVM discovery method from config tool to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
pal1000 committed Mar 20, 2021
1 parent f268d8a commit 8d3b576
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 44 deletions.
50 changes: 19 additions & 31 deletions buildinfo/mingw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -167,44 +161,38 @@ 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
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
Expand Down
12 changes: 6 additions & 6 deletions buildinfo/msvc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
6 changes: 3 additions & 3 deletions buildscript/modules/llvm.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
)

Expand Down Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions buildscript/modules/mesa3d.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildscript/modules/mesonsubprojects.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion buildscript/modules/msyspackages.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
@endlocal&set flexstate=2&set ninjastate=2&set pkgconfigstate=1&set cmakestate=0
3 changes: 3 additions & 0 deletions releasenotes.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8d3b576

Please sign in to comment.