This commit is contained in:
Viktor Szakats 2025-08-18 03:48:03 +02:00
parent d8acdfd573
commit f29d57799f
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -840,22 +840,19 @@ jobs:
else
# Use Ninja when running tests to avoid MSBuild heuristics picking
# up "error messages" in the test log output and making the job fail.
# Unfortunately switching CPU target requires vcvarsall.bat, which
# has no stable disk location, its an MS-DOS batch file setting env,
# and makes it problematic to use from this script.
# Officially this requires the vcvarsall.bat MS-DOS batch file (as of
# VS2022). Since it integrates badly with CI steps and shell scripts
# scripts, reproduce the necessary build configuration manually, and
# without envs.
[[ "$(uname -s)" = *'ARM64'* ]] && MSVC_HOST='arm64' || MSVC_HOST='x64' # x86
MSVC_ROOTD="$(cygpath --mixed --short-name "$PROGRAMFILES/Microsoft Visual Studio")" # to avoid spaces in directory names
MSVC_ROOTU="$(/usr/bin/find "$(cygpath --unix "$MSVC_ROOTD/2022/Enterprise/vc/tools/msvc")" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)"
MSVC_ROOTW="$(cygpath --mixed "$MSVC_ROOTU")"
MSVC_ROOTU="$(cygpath --unix "$MSVC_ROOTW")"
echo "MSVC_ROOTW:|$MSVC_ROOTW|"
echo "MSVC_ROOTU:|$MSVC_ROOTU|"
MSVC_BINU="$MSVC_ROOTU/bin/Host$MSVC_HOST/$MATRIX_ARCH"
echo "MSVC_BINU:|$MSVC_BINU|"
MSDK_ROOTW="$(cygpath --mixed --short-name "$(printenv 'ProgramFiles(x86)')/Windows Kits")/10"
MSDK_ROOTU="$(cygpath --unix "$MSDK_ROOTW")"
MSDK_VER="$(basename "$(/usr/bin/find "$MSDK_ROOTU/lib" -mindepth 1 -maxdepth 1 -type d -name '*.*' | sort | tail -n 1)")"
echo "MSDK_VER:|$MSDK_VER|"
MSDK_LIBW="$MSDK_ROOTW/lib/$MSDK_VER"
MSDK_INCW="$MSDK_ROOTW/include/$MSDK_VER"
MSDK_BINU="$MSDK_ROOTU/bin/$MSDK_VER/$MSVC_HOST"
@ -874,7 +871,7 @@ jobs:
options+=" -DCMAKE_C_COMPILER=$MSVC_BINU/cl.exe"
rcflags+=" -I$MSDK_INCW/shared"
rcflags+=" -I$MSDK_INCW/um"
export CMAKE_GENERATOR='Ninja Multi-Config'
export CMAKE_GENERATOR='Ninja Multi-Config' # pass it via env to avoid space issues
fi
[ "${_chkprefill}" = '_chkprefill' ] && options+=' -D_CURL_PREFILL=OFF'
if [ -n "${MATRIX_INSTALL_VCPKG}" ]; then