Skip to content

Commit ce1be7a

Browse files
committed
FIN: Compile LLVM with -fno-omit-frame-pointer on 32bit MinGW builds
to work around an apparently bad optimization.
1 parent 02f193b commit ce1be7a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/bootstrap/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,13 @@ impl Build {
874874
if target.contains("apple-darwin") {
875875
base.push("-stdlib=libc++".into());
876876
}
877+
878+
// Work around an apparently bad MinGW / GCC optimization,
879+
// See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html
880+
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78936
881+
if target == "i686-pc-windows-gnu" {
882+
base.push("-fno-omit-frame-pointer".into());
883+
}
877884
return base
878885
}
879886

0 commit comments

Comments
 (0)