From f3dda17469bd70feaf6a1d979cdc65dd450f8fcb Mon Sep 17 00:00:00 2001 From: Tim Neumann Date: Mon, 17 Apr 2017 10:24:33 +0200 Subject: FIN: Compile LLVM with -fno-omit-frame-pointer on 32bit MinGW builds to work around an apparently bad optimization. --- src/bootstrap/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 84254d7d6ae..27d4e309a75 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 } -- cgit 1.4.1-3-g733a5