Skip to content

Commit

Permalink
Ensure Cranelift errors are reported deterministically
Browse files Browse the repository at this point in the history
This may also have been the root cause of rust-lang#1310.
  • Loading branch information
bjorn3 committed Dec 16, 2022
1 parent ec92c3e commit 9165542
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ impl OngoingCodegen {

self.concurrency_limiter.finished();

sess.abort_if_errors();

(
CodegenResults {
modules,
Expand Down Expand Up @@ -411,8 +413,6 @@ pub(crate) fn run_aot(
.collect::<Vec<_>>()
});

tcx.sess.abort_if_errors();

let mut allocator_module = make_module(tcx.sess, &backend_config, "allocator_shim".to_string());
let mut allocator_unwind_context = UnwindContext::new(allocator_module.isa(), true);
let created_alloc_shim =
Expand Down

0 comments on commit 9165542

Please sign in to comment.