Skip to content

Commit c768286

Browse files
committed
Auto merge of #2445 - JohnTitor:fix-msrv-on-win, r=JohnTitor
Fix MSRV issue on Windows Fixes #2436
2 parents c6d702f + 6ea2c71 commit c768286

File tree

4 files changed

+52
-4
lines changed

4 files changed

+52
-4
lines changed

.github/workflows/bors.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,30 @@ jobs:
226226
- name: Execute build.sh
227227
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh
228228

229+
build_channels_windows:
230+
name: Build Channels Windows
231+
runs-on: windows-2019
232+
env:
233+
OS: windows
234+
strategy:
235+
fail-fast: true
236+
matrix:
237+
toolchain: [
238+
1.19.0,
239+
1.24.0,
240+
1.25.0,
241+
1.30.0,
242+
stable,
243+
]
244+
steps:
245+
- uses: actions/checkout@v2
246+
- name: Self-update rustup
247+
run: rustup self update
248+
shell: bash
249+
- name: Execute build.sh
250+
run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} WIN_TARGET=${{ matrix.target }} sh ./ci/build.sh
251+
shell: bash
252+
229253
semver_linux:
230254
name: Semver Linux
231255
runs-on: ubuntu-20.04
@@ -283,6 +307,7 @@ jobs:
283307
docker_switch,
284308
build_channels_linux,
285309
build_channels_macos,
310+
build_channels_windows,
286311
docs,
287312
]
288313

@@ -303,6 +328,7 @@ jobs:
303328
docker_switch,
304329
build_channels_linux,
305330
build_channels_macos,
331+
build_channels_windows,
306332
docs,
307333
]
308334

ci/build.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ RUST_NIGHTLY_APPLE_TARGETS="\
161161
aarch64-apple-darwin \
162162
"
163163

164+
# Must start with `x86_64-pc-windows-msvc` first.
165+
RUST_NIGHTLY_WINDOWS_TARGETS="\
166+
x86_64-pc-windows-msvc \
167+
x86_64-pc-windows-gnu \
168+
i686-pc-windows-msvc \
169+
"
170+
164171
# The targets are listed here alphabetically
165172
TARGETS=""
166173
case "${OS}" in
@@ -189,14 +196,23 @@ case "${OS}" in
189196
TARGETS="${TARGETS} ${RUST_NIGHTLY_APPLE_TARGETS}"
190197
fi
191198

199+
;;
200+
windows*)
201+
TARGETS=${RUST_NIGHTLY_WINDOWS_TARGETS}
202+
192203
;;
193204
*)
194205
;;
195206
esac
196207

197208
for TARGET in $TARGETS; do
198209
if echo "$TARGET"|grep -q "$FILTER"; then
199-
test_target build "$TARGET"
210+
if [ "${OS}" = "windows" ]; then
211+
TARGET="$TARGET" sh ./ci/install-rust.sh
212+
test_target build "$TARGET"
213+
else
214+
test_target build "$TARGET"
215+
fi
200216
fi
201217
done
202218

@@ -265,15 +281,15 @@ if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then
265281
done
266282
fi
267283

268-
RUST_OSX_NO_CORE_TARGETS="\
284+
RUST_APPLE_NO_CORE_TARGETS="\
269285
armv7-apple-ios \
270286
armv7s-apple-ios \
271287
i686-apple-darwin \
272288
i386-apple-ios \
273289
"
274290

275291
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "macos" ]; then
276-
for TARGET in $RUST_OSX_NO_CORE_TARGETS; do
292+
for TARGET in $RUST_APPLE_NO_CORE_TARGETS; do
277293
if echo "$TARGET" | grep -q "$FILTER"; then
278294
test_target build "$TARGET" 1
279295
fi

src/windows/msvc/x86_64.rs renamed to src/windows/msvc/x86_64/align.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ s! {
6363
pub MxCsr_Mask: ::c_ulong,
6464
pub FloatRegisters: [M128A; 8],
6565
pub XmmRegisters: [M128A; 16],
66-
_Reserved4: [::c_uchar; 96],
66+
_Reserved4: [[::c_uchar; 16]; 6],
6767
}
6868

6969
#[repr(align(16))]

src/windows/msvc/x86_64/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
cfg_if! {
2+
if #[cfg(libc_align)] {
3+
mod align;
4+
pub use self::align::*;
5+
}
6+
}

0 commit comments

Comments
 (0)