Skip to content

Commit 6510953

Browse files
committed
Auto merge of #161681 - mati865:cross-i686-mingw, r=jieyouxu
Cross-compile i686-pc-windows-gnu std from x86_64 As per rust-lang/compiler-team#1020. We could free up the runner by building it as a part of other job, but other Windows jobs are already quite long and setup on Linux would require finding the fitting toolchain. This can be done as a followup if somebody cares.
2 parents 0f33d09 + 65f4634 commit 6510953

2 files changed

Lines changed: 18 additions & 7 deletions

File tree

src/ci/github-actions/jobs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -821,14 +821,14 @@ auto:
821821

822822
- name: dist-i686-mingw
823823
env:
824-
# Disable RISCV target because building it OOMs.
825824
RUST_CONFIGURE_ARGS: >-
826-
--build=i686-pc-windows-gnu
827-
--enable-full-tools
828-
--set llvm.targets=AArch64;AMDGPU;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;Sparc;SystemZ;WebAssembly;X86
825+
--build=x86_64-pc-windows-gnu
826+
--host=
827+
--target=i686-pc-windows-gnu
828+
--disable-docs
829+
--set target.i686-pc-windows-gnu.linker=i686-w64-mingw32-gcc
829830
SCRIPT: python x.py dist bootstrap --include-default-paths
830-
DIST_REQUIRE_ALL_TOOLS: 1
831-
CODEGEN_BACKENDS: llvm,cranelift
831+
CODEGEN_BACKENDS: llvm
832832
<<: *job-windows
833833

834834
- name: dist-x86_64-mingw

src/ci/scripts/install-mingw.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,17 @@ LLVM_MINGW_ARCHIVE_AARCH64="llvm-mingw-20251104-ucrt-aarch64.zip"
1212
LLVM_MINGW_ARCHIVE_X86_64="llvm-mingw-20251104-ucrt-x86_64.zip"
1313

1414
if isWindows && isKnownToBeMingwBuild; then
15-
case "${CI_JOB_NAME}" in
15+
toolchains=
16+
# i686-pc-windows-gnu is cross-compiled from x86_64-pc-windows-gnu, so we need
17+
# the both toolchains
18+
if [[ "${CI_JOB_NAME}" == *i686-mingw* ]]; then
19+
toolchains=("${CI_JOB_NAME}" "x86_64-mingw")
20+
else
21+
toolchains=("${CI_JOB_NAME}")
22+
fi
23+
24+
for toolchain in "${toolchains[@]}"; do
25+
case "${toolchain}" in
1626
*aarch64-llvm*)
1727
mingw_dir="clangarm64"
1828
mingw_archive="${LLVM_MINGW_ARCHIVE_AARCH64}"
@@ -81,4 +91,5 @@ if isWindows && isKnownToBeMingwBuild; then
8191
# (see https://github.com/actions/runner-images/issues/12600)
8292
/c/msys64/usr/bin/bash -lc ' '
8393
fi
94+
done
8495
fi

0 commit comments

Comments
 (0)