Skip to content

Commit e75e782

Browse files
committed
Auto merge of rust-lang#51645 - marco-c:error_when_incremental_and_profile, r=michaelwoerister
Raise an error if gcov profiling and incremental compilation are both enabled Fixes rust-lang#50203.
2 parents a96c88e + 28670b6 commit e75e782

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc/session/config.rs

+7
Original file line numberDiff line numberDiff line change
@@ -1970,6 +1970,13 @@ pub fn build_session_options_and_crate_config(
19701970
);
19711971
}
19721972

1973+
if debugging_opts.profile && incremental.is_some() {
1974+
early_error(
1975+
error_format,
1976+
"can't instrument with gcov profiling when compiling incrementally",
1977+
);
1978+
}
1979+
19731980
let mut prints = Vec::<PrintRequest>::new();
19741981
if cg.target_cpu.as_ref().map_or(false, |s| s == "help") {
19751982
prints.push(PrintRequest::TargetCPUs);

0 commit comments

Comments
 (0)