From fdea885b800375fb4e9a21e919c6afd84ae0728b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Wed, 3 Dec 2025 17:55:40 +0100 Subject: [PATCH] Revert #149516 to fix i686-pc-windows-gnu host Revert #149516 because it caused dist to pick up x86_64 `libwinpthreads.dll` dependency, resulting in broken toolchain. This reverts commit 5afd8ff8df0e0850b4b5671676f4bb057b33dada, reversing changes made to 7cb02f975248447461a95110eb466c76cb3ac7cf. --- src/ci/scripts/install-mingw.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ci/scripts/install-mingw.sh b/src/ci/scripts/install-mingw.sh index da8e1d55f3ae3..17bedaa7b8266 100755 --- a/src/ci/scripts/install-mingw.sh +++ b/src/ci/scripts/install-mingw.sh @@ -47,6 +47,12 @@ if isWindows && isKnownToBeMingwBuild; then ;; esac + # Stop /msys64/bin from being prepended to PATH by adding the bin directory manually. + # Note that this intentionally uses a Windows style path instead of the msys2 path to + # avoid being auto-translated into `/usr/bin`, which will not have the desired effect. + msys2Path="c:/msys64" + ciCommandAddPath "${msys2Path}/usr/bin" + case "${mingw_archive}" in *.7z) curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}" @@ -67,4 +73,12 @@ if isWindows && isKnownToBeMingwBuild; then esac ciCommandAddPath "$(cygpath -m "$(pwd)/${mingw_dir}/bin")" + + # MSYS2 is not installed on AArch64 runners + if [[ "${CI_JOB_NAME}" != *aarch64-llvm* ]]; then + # Initialize mingw for the user. + # This should be done by github but isn't for some reason. + # (see https://github.com/actions/runner-images/issues/12600) + /c/msys64/usr/bin/bash -lc ' ' + fi fi