diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 84254d7d6ae5..27d4e309a752 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -874,6 +874,13 @@ impl Build { if target.contains("apple-darwin") { base.push("-stdlib=libc++".into()); } + + // Work around an apparently bad MinGW / GCC optimization, + // See: http://lists.llvm.org/pipermail/cfe-dev/2016-December/051980.html + // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78936 + if target == "i686-pc-windows-gnu" { + base.push("-fno-omit-frame-pointer".into()); + } return base }