]> git.lizzy.rs Git - rust.git/commitdiff
FIN: Compile LLVM with -fno-omit-frame-pointer on 32bit MinGW builds
authorTim Neumann <mail@timnn.me>
Mon, 17 Apr 2017 08:24:33 +0000 (10:24 +0200)
committerTim Neumann <mail@timnn.me>
Sun, 23 Apr 2017 20:00:03 +0000 (22:00 +0200)
to work around an apparently bad optimization.

src/bootstrap/lib.rs

index 84254d7d6ae515b2f49afaa647e58aec2bcb2b63..27d4e309a75257e35ef0ade5f27974e5430d59ab 100644 (file)
@@ -874,6 +874,13 @@ fn cflags(&self, target: &str) -> Vec<String> {
         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
     }