Skip to content

Commit 5325015

Browse files
committed
Auto merge of #149600 - mati865:restore-msys2, r=Kivooeo,tgross35
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. Note, I didn't use the procedure explained at: https://forge.rust-lang.org/compiler/reviews.html#reverts because the revert button isn't there. This reverts commit 5afd8ff, reversing changes made to 7cb02f9.
2 parents 83e49b7 + fdea885 commit 5325015

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/ci/scripts/install-mingw.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ if isWindows && isKnownToBeMingwBuild; then
4747
;;
4848
esac
4949

50+
# Stop /msys64/bin from being prepended to PATH by adding the bin directory manually.
51+
# Note that this intentionally uses a Windows style path instead of the msys2 path to
52+
# avoid being auto-translated into `/usr/bin`, which will not have the desired effect.
53+
msys2Path="c:/msys64"
54+
ciCommandAddPath "${msys2Path}/usr/bin"
55+
5056
case "${mingw_archive}" in
5157
*.7z)
5258
curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"
@@ -67,4 +73,12 @@ if isWindows && isKnownToBeMingwBuild; then
6773
esac
6874

6975
ciCommandAddPath "$(cygpath -m "$(pwd)/${mingw_dir}/bin")"
76+
77+
# MSYS2 is not installed on AArch64 runners
78+
if [[ "${CI_JOB_NAME}" != *aarch64-llvm* ]]; then
79+
# Initialize mingw for the user.
80+
# This should be done by github but isn't for some reason.
81+
# (see https://github.com/actions/runner-images/issues/12600)
82+
/c/msys64/usr/bin/bash -lc ' '
83+
fi
7084
fi

0 commit comments

Comments
 (0)