Auto merge of #125546 - ChrisDenton:mingw-ci, r=Mark-Simulacrum · rust-lang/rust@bdbbb6c
11#!/bin/bash
2-# Clean up and prepare the MSYS2 installation. MSYS2 is needed primarily for
3-# the test suite (run-make), but is also used by the MinGW toolchain for assembling things.
2+# Clean up and prepare the MSYS2 installation.
3+# MSYS2 is used by the MinGW toolchain for assembling things.
4455set -euo pipefail
66IFS=$'\n\t'
@@ -24,38 +24,4 @@ if isWindows; then
2424fi
2525 ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64"
2626 ciCommandAddPath "C:\\hostedtoolcache\\windows\\Python\\${native_python_version}\\x64\\Scripts"
27-28-# Install pacboy for easily installing packages
29- pacman -S --noconfirm pactoys
30-31-# Remove these pre-installed tools so we can't accidentally use them, because we are using the
32-# MSYS2 setup action versions instead. Because `rm -r`-ing them is slow, we mv them off path
33-# instead.
34-# Remove pre-installed version of MSYS2
35-echo "Cleaning up existing tools in PATH"
36- notpath="/c/NOT/ON/PATH/"
37- mkdir --parents "$notpath"
38- mv -t "$notpath" "/c/msys64/"
39-# Remove Strawberry Perl, which contains a version of mingw
40- mv -t "$notpath" "/c/Strawberry/"
41-# Remove these other copies of mingw, I don't even know where they come from.
42- mv -t "$notpath" "/c/mingw64/"
43- mv -t "$notpath" "/c/mingw32/"
44-echo "Finished cleaning up tools in PATH"
45-46-if isKnownToBeMingwBuild; then
47-# Use the mingw version of CMake for mingw builds.
48-# However, the MSVC build needs native CMake, as it fails with the mingw one.
49-# Delete native CMake
50- rm -r "/c/Program Files/CMake/"
51-# Install mingw-w64-$arch-cmake
52- pacboy -S --noconfirm cmake:p
53-54-# It would be nice to use MSYS's git in MinGW builds so that it's tested and known to
55-# work. But it makes everything extremely slow, so it's commented out for now.
56-# # Delete Windows-Git
57-# rm -r "/c/Program Files/Git/"
58-# # Install MSYS2 git
59-# pacman -S --noconfirm git
60-fi
6127fi