]> git.lizzy.rs Git - rust.git/commitdiff
Emit warning when trying to use PGO in conjunction with unwinding on Windows.
authorEric Rahm <ericrahm@gmail.com>
Fri, 14 Jun 2019 17:58:39 +0000 (10:58 -0700)
committerMark Rousskov <mark.simulacrum@gmail.com>
Tue, 9 Jul 2019 21:17:30 +0000 (17:17 -0400)
src/librustc/session/mod.rs

index 3cbf0ee213ae371891821890de7a2086d3e61bc8..b17ba8de73049d1e52c8f24d17366aa36436d650 100644 (file)
@@ -1303,15 +1303,15 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
     }
 
     // PGO does not work reliably with panic=unwind on Windows. Let's make it
-    // an error to combine the two for now. It always runs into an assertions
+    // a warning to combine the two for now. It always runs into an assertions
     // if LLVM is built with assertions, but without assertions it sometimes
     // does not crash and will probably generate a corrupted binary.
     if sess.opts.cg.profile_generate.enabled() &&
        sess.target.target.options.is_like_msvc &&
        sess.panic_strategy() == PanicStrategy::Unwind {
-        sess.err("Profile-guided optimization does not yet work in conjunction \
-                  with `-Cpanic=unwind` on Windows when targeting MSVC. \
-                  See https://github.com/rust-lang/rust/issues/61002 for details.");
+        sess.warn("Profile-guided optimization does not yet work in conjunction \
+                   with `-Cpanic=unwind` on Windows when targeting MSVC. \
+                   See https://github.com/rust-lang/rust/issues/61002 for details.");
     }
 }