Skip to content

Commit 3c3e375

Browse files
authored
Rollup merge of rust-lang#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 rust-lang#61002 to just a warning.
2 parents e7efdf1 + 74a39a3 commit 3c3e375

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/librustc/session/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,15 +1303,15 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
13031303
}
13041304

13051305
// PGO does not work reliably with panic=unwind on Windows. Let's make it
1306-
// an error to combine the two for now. It always runs into an assertions
1306+
// a warning to combine the two for now. It always runs into an assertions
13071307
// if LLVM is built with assertions, but without assertions it sometimes
13081308
// does not crash and will probably generate a corrupted binary.
13091309
if sess.opts.cg.profile_generate.enabled() &&
13101310
sess.target.target.options.is_like_msvc &&
13111311
sess.panic_strategy() == PanicStrategy::Unwind {
1312-
sess.err("Profile-guided optimization does not yet work in conjunction \
1313-
with `-Cpanic=unwind` on Windows when targeting MSVC. \
1314-
See https://github.com/rust-lang/rust/issues/61002 for details.");
1312+
sess.warn("Profile-guided optimization does not yet work in conjunction \
1313+
with `-Cpanic=unwind` on Windows when targeting MSVC. \
1314+
See https://github.com/rust-lang/rust/issues/61002 for details.");
13151315
}
13161316
}
13171317

0 commit comments

Comments
 (0)