We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e943426 commit eeb7348Copy full SHA for eeb7348
src/librustc/session/mod.rs
@@ -1272,6 +1272,15 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
1272
sess.err("Linker plugin based LTO is not supported together with \
1273
`-C prefer-dynamic` when targeting MSVC");
1274
}
1275
+
1276
+ // Make sure that any given profiling data actually exists so LLVM can't
1277
+ // decide to silently skip PGO.
1278
+ if let Some(ref path) = sess.opts.debugging_opts.pgo_use {
1279
+ if !path.exists() {
1280
+ sess.err(&format!("File `{}` passed to `-Zpgo-use` does not exist.",
1281
+ path.display()));
1282
+ }
1283
1284
1285
1286
/// Hash value constructed out of all the `-C metadata` arguments passed to the
0 commit comments