summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-10-13 04:37:21 +0000
committerbors <bors@rust-lang.org>2021-10-13 04:37:21 +0000
commitc768286cfed305e68103886f57fc2127b6f453b8 (patch)
treebcf9dc67c29afcc1637f435c247bbce4ecb2fceb
parentc6d702f01c6d61037bd974d6dc95e08dadb390a4 (diff)
parent6ea2c7100f20f2f6a0c8079044585c3fb8ee51f3 (diff)
downloadrust-libc-c768286cfed305e68103886f57fc2127b6f453b8.tar.gz
Auto merge of #2445 - JohnTitor:fix-msrv-on-win, r=JohnTitor
Fix MSRV issue on Windows Fixes #2436
-rw-r--r--.github/workflows/bors.yml26
-rw-r--r--ci/build.sh22
-rw-r--r--src/windows/msvc/x86_64/align.rs (renamed from src/windows/msvc/x86_64.rs)2
-rw-r--r--src/windows/msvc/x86_64/mod.rs6
4 files changed, 52 insertions, 4 deletions
diff --git a/.github/workflows/bors.yml b/.github/workflows/bors.yml
index 5bbf286c86..0b85a7f70b 100644
--- a/.github/workflows/bors.yml
+++ b/.github/workflows/bors.yml
@@ -226,6 +226,30 @@ jobs:
- name: Execute build.sh
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
+ build_channels_windows:
+ name: Build Channels Windows
+ runs-on: windows-2019
+ env:
+ OS: windows
+ strategy:
+ fail-fast: true
+ matrix:
+ toolchain: [
+ 1.19.0,
+ 1.24.0,
+ 1.25.0,
+ 1.30.0,
+ stable,
+ ]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Self-update rustup
+ run: rustup self update
+ shell: bash
+ - name: Execute build.sh
+ run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} WIN_TARGET=${{ matrix.target }} sh ./ci/build.sh
+ shell: bash
+
semver_linux:
name: Semver Linux
runs-on: ubuntu-20.04
@@ -283,6 +307,7 @@ jobs:
docker_switch,
build_channels_linux,
build_channels_macos,
+ build_channels_windows,
docs,
]
@@ -303,6 +328,7 @@ jobs:
docker_switch,
build_channels_linux,
build_channels_macos,
+ build_channels_windows,
docs,
]
diff --git a/ci/build.sh b/ci/build.sh
index 51ce8bc348..21c08fbeb3 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -161,6 +161,13 @@ RUST_NIGHTLY_APPLE_TARGETS="\
aarch64-apple-darwin \
"
+# Must start with `x86_64-pc-windows-msvc` first.
+RUST_NIGHTLY_WINDOWS_TARGETS="\
+x86_64-pc-windows-msvc \
+x86_64-pc-windows-gnu \
+i686-pc-windows-msvc \
+"
+
# The targets are listed here alphabetically
TARGETS=""
case "${OS}" in
@@ -190,13 +197,22 @@ case "${OS}" in
fi
;;
+ windows*)
+ TARGETS=${RUST_NIGHTLY_WINDOWS_TARGETS}
+
+ ;;
*)
;;
esac
for TARGET in $TARGETS; do
if echo "$TARGET"|grep -q "$FILTER"; then
- test_target build "$TARGET"
+ if [ "${OS}" = "windows" ]; then
+ TARGET="$TARGET" sh ./ci/install-rust.sh
+ test_target build "$TARGET"
+ else
+ test_target build "$TARGET"
+ fi
fi
done
@@ -265,7 +281,7 @@ if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
done
fi
-RUST_OSX_NO_CORE_TARGETS="\
+RUST_APPLE_NO_CORE_TARGETS="\
armv7-apple-ios \
armv7s-apple-ios \
i686-apple-darwin \
@@ -273,7 +289,7 @@ i386-apple-ios \
"
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "macos" ]; then
- for TARGET in $RUST_OSX_NO_CORE_TARGETS; do
+ for TARGET in $RUST_APPLE_NO_CORE_TARGETS; do
if echo "$TARGET" | grep -q "$FILTER"; then
test_target build "$TARGET" 1
fi
diff --git a/src/windows/msvc/x86_64.rs b/src/windows/msvc/x86_64/align.rs
index 249e590165..b10e4f71b9 100644
--- a/src/windows/msvc/x86_64.rs
+++ b/src/windows/msvc/x86_64/align.rs
@@ -63,7 +63,7 @@ s! {
pub MxCsr_Mask: ::c_ulong,
pub FloatRegisters: [M128A; 8],
pub XmmRegisters: [M128A; 16],
- _Reserved4: [::c_uchar; 96],
+ _Reserved4: [[::c_uchar; 16]; 6],
}
#[repr(align(16))]
diff --git a/src/windows/msvc/x86_64/mod.rs b/src/windows/msvc/x86_64/mod.rs
new file mode 100644
index 0000000000..45447da34f
--- /dev/null
+++ b/src/windows/msvc/x86_64/mod.rs
@@ -0,0 +1,6 @@
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ }
+}