Skip to content
Browse files

Emit error when trying to use PGO in conjunction with unwinding on Wi…

  • Loading branch information...
michaelwoerister committed May 21, 2019
1 parent 837b72c commit 9f92668ce1ae2d4634a0a04024b316ba8b6939a2
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/librustc/session/
@@ -1281,6 +1281,18 @@ 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
// if LLVM is built with assertions, but without assertions it sometimes
// does not crash and will probably generate a corrupted binary.
if sess.opts.debugging_opts.pgo_gen.enabled() && &&
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 for details.");

/// Hash value constructed out of all the `-C metadata` arguments passed to the

0 comments on commit 9f92668

Please sign in to comment.
You can’t perform that action at this time.