about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-07-10 05:14:04 +0200
committerGitHub <noreply@github.com>2019-07-10 05:14:04 +0200
commit3c3e3756b0e9852960acda062f3c3da1ff079811 (patch)
treec5b8a9bf751a0e4ed911536d6e7b162fbdbd34af /src
parente7efdf1c33c699def0e594f03337efc78120bd9c (diff)
parent74a39a39a4a0650d110083afa6e0b226f7b61ca9 (diff)
downloadrust-3c3e3756b0e9852960acda062f3c3da1ff079811.tar.gz
rust-3c3e3756b0e9852960acda062f3c3da1ff079811.zip
Rollup merge of #61853 - EricRahm:use_warning, r=varkor
Emit warning when trying to use PGO in conjunction with unwinding on …

…Windows.

This reduces the error introduced for #61002 to just a warning.
Diffstat (limited to 'src')
-rw-r--r--src/librustc/session/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs
index 3cbf0ee213a..b17ba8de730 100644
--- a/src/librustc/session/mod.rs
+++ b/src/librustc/session/mod.rs
@@ -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.");
     }
 }