Skip to content

Commit

Permalink
MSVC build: Finish zstd compression support
Browse files Browse the repository at this point in the history
  • Loading branch information
pal1000 committed Apr 9, 2024
1 parent 9ab9337 commit 325d8e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions buildscript/modules/mesonsubprojects.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ set "exitloop="
@echo.
)

@rem Use zstd wrap
@CMD /C EXIT 0
@FC /B "%devroot%\%projectname%\buildscript\mesonsubprojects\zstd.wrap" "%devroot%\mesa\subprojects\zstd.wrap">NUL 2>&1
@if NOT "%ERRORLEVEL%"=="0" (
@set exitloop=1
@for /f tokens^=2^ delims^=^=^ eol^= %%a IN ('type "%devroot%\%projectname%\buildscript\mesonsubprojects\zstd.wrap"') DO @for /f tokens^=2^ delims^=_^ eol^= %%b IN ("%%a") DO @for /f tokens^=1^ delims^=/^ eol^= %%c IN ("%%b") DO @IF defined exitloop (
@echo Using wrap file version %%c from Meson wrapdb to build zstd...
set "exitloop="
)
@copy /Y "%devroot%\%projectname%\buildscript\mesonsubprojects\zstd.wrap" "%devroot%\mesa\subprojects\zstd.wrap"
@echo.
)

@rem Use up-to-date libelf-lfg-win32
@CMD /C EXIT 0
@FC /B "%devroot%\%projectname%\buildscript\mesonsubprojects\libelf.wrap" "%devroot%\mesa\subprojects\libelf.wrap">NUL 2>&1
Expand Down Expand Up @@ -112,6 +125,8 @@ set "exitloop="
@IF EXIST "%devroot%\mesa\subprojects\libelf.wrap" del "%devroot%\mesa\subprojects\libelf.wrap"
@for /f delims^=^ eol^= %%a in ('dir /b /a^:d "%devroot%\mesa\subprojects\zlib-*" 2^>^&1') do @IF EXIST "%devroot%\mesa\subprojects\%%~nxa\" RD /S /Q "%devroot%\mesa\subprojects\%%~nxa"
@IF EXIST "%devroot%\mesa\subprojects\zlib.wrap" del "%devroot%\mesa\subprojects\zlib.wrap"
@for /f delims^=^ eol^= %%a in ('dir /b /a^:d "%devroot%\mesa\subprojects\zstd-*" 2^>^&1') do @IF EXIST "%devroot%\mesa\subprojects\%%~nxa\" RD /S /Q "%devroot%\mesa\subprojects\%%~nxa"
@IF EXIST "%devroot%\mesa\subprojects\zstd.wrap" del "%devroot%\mesa\subprojects\zstd.wrap"

@rem Link clang in same way as LLVM
@if /I NOT "%linkmingwdynamic%"=="y" IF %disableootpatch%==1 IF EXIST "%msysloc%\%LMSYSTEM%\lib\libclang-cpp.dll.a" del "%msysloc%\%LMSYSTEM%\lib\libclang-cpp.dll.a"
Expand Down
3 changes: 2 additions & 1 deletion releasenotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Build script
- openclon12: Detect nuget packages usage and allow Ninja build if unused.
- openclon12: Detect nuget packages usage and allow Ninja build if unused;
- MSVC build: zstd compression support.
### Out of tree patching
- Narrow static link with LLVM+clang 18 build fix to [Mesa 24.0.4 and older](https://gitlab.freedesktop.org/mesa/mesa/-/commits/staging/24.0?search=fix%20link%20failure%20with%20llvm-18).
# 24.0.4
Expand Down

0 comments on commit 325d8e0

Please sign in to comment.