ci: build with subrandr on mingw64 and msys2

This commit is contained in:
Hubert Głuchowski
2025-07-06 19:50:16 +02:00
committed by Kacper Michajłow
parent 4921c61bff
commit 454573bc08
3 changed files with 28 additions and 4 deletions
+7
View File
@@ -4,3 +4,10 @@ common_args="--werror \
"
export CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3"
build_subrandr() {
git clone --depth=1 https://github.com/afishhh/subrandr.git
pushd subrandr
cargo xtask install --prefix "$@"
popd
}
+9 -1
View File
@@ -286,6 +286,11 @@ _luajit () {
}
_luajit_mark=lib/libluajit-5.1.a
_subrandr () {
build_subrandr "$prefix_dir" --target "$RUST_TARGET" -- -- -L"$prefix_dir"/lib
}
_subrandr_mark=lib/libsubrandr.dll.a
for x in iconv zlib shaderc spirv-cross nv-headers dav1d lcms2; do
build_if_missing $x
done
@@ -296,6 +301,9 @@ fi
for x in ffmpeg libplacebo freetype fribidi harfbuzz libass luajit; do
build_if_missing $x
done
if [[ "$TARGET" != "i686-"* ]]; then
build_if_missing subrandr
fi
## mpv
@@ -330,7 +338,7 @@ if [ "$2" = pack ]; then
pushd artifact/tmp
dlls=(
libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime
av*.dll sw*.dll postproc-[0-9]*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll
av*.dll sw*.dll {postproc,subrandr}-[0-9]*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll
lib{shaderc_shared,spirv-cross-c-shared,dav1d,lcms2}.dll zlib1.dll
)
if [[ -f vulkan-1.dll ]]; then
+12 -3
View File
@@ -8,9 +8,18 @@ args=(
-D{egl-angle-lib,egl-angle-win32,pdf-build,rubberband,win32-smtc}=enabled
)
[[ "$SYS" == "clang64" ]] && args+=(
-Db_sanitize=address,undefined
)
if [[ "$SYS" == "clang64" ]]; then
args+=(
-Db_sanitize=address,undefined
)
else
# currently building with subrandr on clang64+asan
# causes a weird crash (https://github.com/msys2/MINGW-packages/issues/25267)
echo "::group::Building subrandr"
build_subrandr "/$SYS"
echo "::endgroup::"
args+=(-Dsubrandr=enabled)
fi
[[ "$SYS" == "clangarm64" ]] && args+=(
-Dpdf-build=disabled