Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ fn runtime_dll_dist(rust_root: &Path, target: TargetSelection, builder: &Builder
return;
}

let (bin_path, libs_path) = get_cc_search_dirs(target, builder);
let (bin_path, _) = get_cc_search_dirs(target, builder);

let mut rustc_dlls = vec![];
// windows-gnu and windows-gnullvm require different runtime libs
Expand All @@ -316,15 +316,6 @@ fn runtime_dll_dist(rust_root: &Path, target: TargetSelection, builder: &Builder
} else {
panic!("Vendoring of runtime DLLs for `{target}` is not supported`");
}
// FIXME(#144656): Remove this whole `let ...`
let bin_path = if target.ends_with("windows-gnullvm") && builder.host_target != target {
bin_path
.into_iter()
.chain(libs_path.iter().map(|path| path.with_file_name("bin")))
.collect()
} else {
bin_path
};
let rustc_dlls = find_files(&rustc_dlls, &bin_path);

// Copy runtime dlls next to rustc.exe
Expand Down Expand Up @@ -1824,8 +1815,7 @@ impl Step for Extended {
cmd.run(builder);
}

// FIXME(mati865): `gnullvm` here is temporary, remove it once it can host itself
if target.is_windows() && !target.contains("gnullvm") {
if target.is_windows() {
let exe = tmp.join("exe");
let _ = fs::remove_dir_all(&exe);

Expand Down
35 changes: 0 additions & 35 deletions src/ci/docker/host-x86_64/dist-aarch64-windows-gnullvm/Dockerfile

This file was deleted.

37 changes: 0 additions & 37 deletions src/ci/docker/host-x86_64/dist-x86_64-windows-gnullvm/Dockerfile

This file was deleted.

This file was deleted.

28 changes: 22 additions & 6 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ auto:
- name: dist-s390x-linux
<<: *job-linux-4c

- name: dist-aarch64-windows-gnullvm
<<: *job-linux-4c

- name: dist-x86_64-windows-gnullvm
<<: *job-linux-4c

- name: dist-various-1
<<: *job-linux-4c

Expand Down Expand Up @@ -689,6 +683,28 @@ auto:
CODEGEN_BACKENDS: llvm,cranelift
<<: *job-windows

- name: dist-aarch64-llvm-mingw
env:
SCRIPT: python x.py dist bootstrap --include-default-paths
RUST_CONFIGURE_ARGS: >-
--build=aarch64-pc-windows-gnullvm
--enable-full-tools
--enable-profiler
DIST_REQUIRE_ALL_TOOLS: 1
CODEGEN_BACKENDS: llvm,cranelift
<<: *job-windows

- name: dist-x86_64-llvm-mingw
env:
SCRIPT: python x.py dist bootstrap --include-default-paths
RUST_CONFIGURE_ARGS: >-
--build=x86_64-pc-windows-gnullvm
--enable-full-tools
--enable-profiler
DIST_REQUIRE_ALL_TOOLS: 1
CODEGEN_BACKENDS: llvm,cranelift
<<: *job-windows

- name: dist-x86_64-msvc-alt
env:
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --enable-extended --enable-profiler
Expand Down
43 changes: 34 additions & 9 deletions src/ci/scripts/install-mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,36 @@ source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"

MINGW_ARCHIVE_32="i686-14.1.0-release-posix-dwarf-msvcrt-rt_v12-rev0.7z"
MINGW_ARCHIVE_64="x86_64-14.1.0-release-posix-seh-msvcrt-rt_v12-rev0.7z"
LLVM_MINGW_ARCHIVE_AARCH64="llvm-mingw-20251104-ucrt-aarch64.zip"
LLVM_MINGW_ARCHIVE_X86_64="llvm-mingw-20251104-ucrt-x86_64.zip"

if isWindows && isKnownToBeMingwBuild; then
case "${CI_JOB_NAME}" in
*aarch64-llvm*)
mingw_dir="clangarm64"
mingw_archive="${LLVM_MINGW_ARCHIVE_AARCH64}"
# Temporary workaround: https://github.com/mstorsjo/llvm-mingw/issues/493
mkdir -p $mingw_dir/bin
ln -s aarch64-w64-windows-gnu.cfg $mingw_dir/bin/aarch64-pc-windows-gnu.cfg
;;
*x86_64-llvm*)
mingw_dir="clang64"
mingw_archive="${LLVM_MINGW_ARCHIVE_X86_64}"
# Temporary workaround: https://github.com/mstorsjo/llvm-mingw/issues/493
mkdir -p $mingw_dir/bin
ln -s x86_64-w64-windows-gnu.cfg $mingw_dir/bin/x86_64-pc-windows-gnu.cfg
;;
*i686*)
bits=32
mingw_dir="mingw32"
mingw_archive="${MINGW_ARCHIVE_32}"
;;
*x86_64*)
bits=64
mingw_dir="mingw64"
mingw_archive="${MINGW_ARCHIVE_64}"
;;
*aarch64*)
# aarch64 is a cross-compiled target. Use the x86_64
# mingw, since that's the host architecture.
bits=64
mingw_archive="${MINGW_ARCHIVE_64}"
echo "AArch64 Windows is not supported by GNU tools"
exit 1
;;
*)
echo "src/ci/scripts/install-mingw.sh can't detect the builder's architecture"
Expand All @@ -38,10 +52,21 @@ if isWindows && isKnownToBeMingwBuild; then
msys2Path="c:/msys64"
ciCommandAddPath "${msys2Path}/usr/bin"

mingw_dir="mingw${bits}"
case "${mingw_archive}" in
*.7z)
curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"
7z x -y mingw.7z > /dev/null
;;
*.zip)
curl -o mingw.zip "${MIRRORS_BASE}/${mingw_archive}"
7z -d $mingw_dir mingw.zip > /dev/null
;;
*)
echo "Unrecognized archive type"
exit 1
;;
esac

curl -o mingw.7z "${MIRRORS_BASE}/${mingw_archive}"
7z x -y mingw.7z > /dev/null
ciCommandAddPath "$(cygpath -m "$(pwd)/${mingw_dir}/bin")"

# Initialize mingw for the user.
Expand Down
Loading