Skip to content

Commit 8cf8fc9

Browse files
committed
Auto merge of #40777 - alexcrichton:update-mingw-compilers, r=aturon
appveyor: Upgrade MinGW toolchains we use In debugging #40546 I was able to reproduce locally finally using the literal toolchain that the bots were using. I reproduced the error maybe 4 in 10 builds. I also have the 6.3.0 toolchain installed through `pacman` which has yet to have a failed build. When attempting to reproduce the bug with the toolchain that this commit switches to I was unable to reproduce anything after a few builds. I have no idea what the original problem was, but I'm hoping that it was just some random bug fixed somewhere along the way. I don't currently know of a technical reason to stick to the 4.9.2 toolchains we were previously using. Historcal 5.3.* toolchains would cause llvm to segfault (maybe a miscompile?) but this seems to have been fixed recently. To me if it passes CI then I think we're good. Closes #40546
2 parents f2036c7 + e6e8c91 commit 8cf8fc9

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

appveyor.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ environment:
4545
- MSYS_BITS: 32
4646
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-ninja
4747
SCRIPT: python x.py test
48-
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
49-
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
48+
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
49+
MINGW_ARCHIVE: i686-6.3.0-release-win32-dwarf-rt_v5-rev1.7z
5050
MINGW_DIR: mingw32
5151
- MSYS_BITS: 64
5252
SCRIPT: python x.py test
5353
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-ninja
54-
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
55-
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
54+
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
55+
MINGW_ARCHIVE: x86_64-6.3.0-release-win32-seh-rt_v5-rev1.7z
5656
MINGW_DIR: mingw64
5757

5858
# 32/64 bit MSVC and GNU deployment
@@ -70,15 +70,15 @@ environment:
7070
- MSYS_BITS: 32
7171
RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-extended --enable-ninja
7272
SCRIPT: python x.py dist
73-
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
74-
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
73+
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
74+
MINGW_ARCHIVE: i686-6.3.0-release-win32-dwarf-rt_v5-rev1.7z
7575
MINGW_DIR: mingw32
7676
DEPLOY: 1
7777
- MSYS_BITS: 64
7878
SCRIPT: python x.py dist
7979
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-extended --enable-ninja
80-
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci
81-
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
80+
MINGW_URL: https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror
81+
MINGW_ARCHIVE: x86_64-6.3.0-release-win32-seh-rt_v5-rev1.7z
8282
MINGW_DIR: mingw64
8383
DEPLOY: 1
8484

src/test/run-pass/issue-16671.rs

+7-20
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// DON'T REENABLE THIS UNLESS YOU'VE ACTUALLY FIXED THE UNDERLYING ISSUE
12-
// ignore-android seems to block forever
11+
#![deny(warnings)]
1312

14-
// ignore-emscripten no threads support
13+
fn foo<F: FnOnce()>(_f: F) { }
1514

16-
#![forbid(warnings)]
17-
18-
// Pretty printing tests complain about `use std::predule::*`
19-
#![allow(unused_imports)]
20-
21-
// A var moved into a proc, that has a mutable loan path should
22-
// not trigger a misleading unused_mut warning.
23-
24-
use std::io::prelude::*;
25-
use std::thread;
26-
27-
pub fn main() {
28-
let mut stdin = std::io::stdin();
29-
thread::spawn(move|| {
30-
let mut v = Vec::new();
31-
let _ = stdin.read_to_end(&mut v);
32-
}).join().ok().unwrap();
15+
fn main() {
16+
let mut var = Vec::new();;
17+
foo(move|| {
18+
var.push(1);
19+
});
3320
}

src/tools/compiletest/src/procsrv.rs

+18-1
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,26 @@ pub fn run(lib_path: &str,
5757

5858
let mut cmd = Command::new(prog);
5959
cmd.args(args)
60-
.stdin(Stdio::piped())
6160
.stdout(Stdio::piped())
6261
.stderr(Stdio::piped());
62+
63+
// Why oh why do we sometimes make a pipe and sometimes inherit the stdin
64+
// stream, well that's an excellent question! In theory it should suffice to
65+
// always create a pipe here and be done with it. Unfortunately though
66+
// there's apparently something odd with the gdb that comes with gcc 6.3.0
67+
// on MinGW. Tracked at rust-lang/rust#40184 when stdin is piped here
68+
// (unconditionally) then all gdb tests will fail on MinGW when using gcc
69+
// 6.3.0. WHen using an inherited stdin though they happen to all work!
70+
//
71+
// As to why this fixes the issue, well, I have no idea. If you can remove
72+
// this branch and unconditionally use `piped` and it gets past @bors please
73+
// feel free to send a PR!
74+
if input.is_some() || !cfg!(windows) {
75+
cmd.stdin(Stdio::piped());
76+
} else {
77+
cmd.stdin(Stdio::inherit());
78+
}
79+
6380
add_target_env(&mut cmd, lib_path, aux_path);
6481
for (key, val) in env {
6582
cmd.env(&key, &val);

0 commit comments

Comments
 (0)