Add -Z no-parallel-llvm flag
Codegen issues commonly only manifest under specific circumstances, e.g. if multiple codegen units are used and ThinLTO is enabled. However, these configuration are threaded, making the use of LLVM debugging facilities hard, as output is interleaved. This patch adds a -Z no-parallel-llvm flag, which allows disabling parallelization of codegen and linking, while otherwise preserving behavior with regard to codegen units and LTO.
This commit is contained in:
parent
9f80ea3281
commit
54f0668a10
2 changed files with 8 additions and 2 deletions
|
@ -1738,7 +1738,9 @@ fn start_executing_work(tcx: TyCtxt,
|
|||
.binary_search_by_key(&cost, |&(_, cost)| cost)
|
||||
.unwrap_or_else(|e| e);
|
||||
work_items.insert(insertion_index, (work, cost));
|
||||
helper.request_token();
|
||||
if !cgcx.opts.debugging_opts.no_parallel_llvm {
|
||||
helper.request_token();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1842,7 +1844,9 @@ fn start_executing_work(tcx: TyCtxt,
|
|||
};
|
||||
work_items.insert(insertion_index, (llvm_work_item, cost));
|
||||
|
||||
helper.request_token();
|
||||
if !cgcx.opts.debugging_opts.no_parallel_llvm {
|
||||
helper.request_token();
|
||||
}
|
||||
assert_eq!(main_thread_worker_state,
|
||||
MainThreadWorkerState::Codegenning);
|
||||
main_thread_worker_state = MainThreadWorkerState::Idle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue