diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9b349aadfc882..1583936a0a4ad 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -125,15 +125,13 @@ jobs: os: windows-11-arm - target: aarch64-unknown-linux-gnu os: ubuntu-24.04-arm - # FIXME: It currently causes segfaults. - #- target: i686-pc-windows-gnu - # env: { ARCH_BITS: 32, ARCH: i686 } + - target: i686-pc-windows-gnu + os: windows-2025 - target: i686-pc-windows-msvc os: windows-2025 - target: i686-unknown-linux-gnu - target: x86_64-pc-windows-gnu os: windows-2025 - env: { ARCH_BITS: 64, ARCH: x86_64 } - target: x86_64-pc-windows-msvc os: windows-2025 - target: x86_64-unknown-linux-gnu diff --git a/ci/install-rust.sh b/ci/install-rust.sh index 69e8ba97a5d3d..b40f1df4e7a54 100755 --- a/ci/install-rust.sh +++ b/ci/install-rust.sh @@ -38,23 +38,11 @@ if [ -n "${INSTALL_RUST_SRC:-}" ]; then fi if [ "$os" = "windows" ]; then - if [ "${ARCH_BITS:-}" = "i686" ]; then - echo "Install MinGW32" - choco install mingw --x86 --force - fi - echo "Find GCC libraries" gcc -print-search-dirs - /usr/bin/find "C:\ProgramData\Chocolatey" -name "crt2*" - /usr/bin/find "C:\ProgramData\Chocolatey" -name "dllcrt2*" - /usr/bin/find "C:\ProgramData\Chocolatey" -name "libmsvcrt*" - - if [ -n "${ARCH_BITS:-}" ]; then - echo "Fix MinGW" - for i in crt2.o dllcrt2.o libmingwex.a libmsvcrt.a; do - cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw$ARCH_BITS/$ARCH-w64-mingw32/lib/$i" "$(rustc --print sysroot)/lib/rustlib/$TARGET/lib" - done - fi + /usr/bin/find "C:\ProgramData\chocolatey" -name "crt2*" + /usr/bin/find "C:\ProgramData\chocolatey" -name "dllcrt2*" + /usr/bin/find "C:\ProgramData\chocolatey" -name "libmsvcrt*" fi echo "Query rust and cargo versions" diff --git a/src/windows/gnu/mod.rs b/src/windows/gnu/mod.rs index 7ea6a933c8e85..6dfa85231b442 100644 --- a/src/windows/gnu/mod.rs +++ b/src/windows/gnu/mod.rs @@ -1,5 +1,7 @@ use crate::prelude::*; +// The below configuration for machines with 32-bit word size aligns with the +// declaration in the `mingw-w64` headers. cfg_if! { if #[cfg(target_pointer_width = "64")] { s_no_extra_traits! { @@ -10,9 +12,9 @@ cfg_if! { } } else if #[cfg(target_pointer_width = "32")] { s_no_extra_traits! { - #[repr(align(16))] + #[repr(align(8))] pub struct max_align_t { - priv_: [i64; 6], + priv_: [i64; 3], } } }