In additional to segfault, retry the linker on bus error as well.

This commit is contained in:
kennytm 2017-11-16 01:01:18 +08:00
parent cd57b761ce
commit 3d791d29b8
No known key found for this signature in database
GPG Key ID: FEF6C8051D0E013C

View File

@ -644,9 +644,9 @@ fn link_natively(sess: &Session,
let mut out = output.stderr.clone();
out.extend(&output.stdout);
let out = String::from_utf8_lossy(&out);
let msg = "clang: error: unable to execute command: \
Segmentation fault: 11";
if !out.contains(msg) {
let msg_segv = "clang: error: unable to execute command: Segmentation fault: 11";
let msg_bus = "clang: error: unable to execute command: Bus error: 10";
if !(out.contains(msg_segv) || out.contains(msg_bus)) {
break
}