1
Fork 0

Merge commit '35d9c6bf25' into sync_cg_clif-2022-02-23

This commit is contained in:
bjorn3 2022-02-23 11:49:34 +01:00
commit f596dce542
24 changed files with 843 additions and 809 deletions

View file

@ -56,6 +56,9 @@ fn emit_module(
let tmp_file = tcx.output_filenames(()).temp_path(OutputType::Object, Some(&name));
let obj = product.object.write().unwrap();
tcx.sess.prof.artifact_size("object_file", name.clone(), obj.len().try_into().unwrap());
if let Err(err) = std::fs::write(&tmp_file, obj) {
tcx.sess.fatal(&format!("error writing object file: {}", err));
}

View file

@ -7,7 +7,6 @@ use std::lazy::SyncOnceCell;
use std::os::raw::{c_char, c_int};
use std::sync::{mpsc, Mutex};
use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
use rustc_codegen_ssa::CrateInfo;
use rustc_middle::mir::mono::MonoItem;
use rustc_session::Session;
@ -381,12 +380,5 @@ fn codegen_shim<'tcx>(cx: &mut CodegenCx<'tcx>, module: &mut JITModule, inst: In
let ret_vals = trampoline_builder.func.dfg.inst_results(call_inst).to_vec();
trampoline_builder.ins().return_(&ret_vals);
module
.define_function(
func_id,
&mut cx.cached_context,
&mut NullTrapSink {},
&mut NullStackMapSink {},
)
.unwrap();
module.define_function(func_id, &mut cx.cached_context).unwrap();
}