Skip to content

Commit 9165542

Browse files
committed
Ensure Cranelift errors are reported deterministically
This may also have been the root cause of rust-lang#1310.
1 parent ec92c3e commit 9165542

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/driver/aot.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ impl OngoingCodegen {
108108

109109
self.concurrency_limiter.finished();
110110

111+
sess.abort_if_errors();
112+
111113
(
112114
CodegenResults {
113115
modules,
@@ -411,8 +413,6 @@ pub(crate) fn run_aot(
411413
.collect::<Vec<_>>()
412414
});
413415

414-
tcx.sess.abort_if_errors();
415-
416416
let mut allocator_module = make_module(tcx.sess, &backend_config, "allocator_shim".to_string());
417417
let mut allocator_unwind_context = UnwindContext::new(allocator_module.isa(), true);
418418
let created_alloc_shim =

0 commit comments

Comments
 (0)