Merge commit '03f01bbe90
' into update_cg_clif-2020-11-01
This commit is contained in:
commit
216c4ae463
53 changed files with 609 additions and 385 deletions
|
@ -94,7 +94,7 @@ pub(super) fn run_jit(tcx: TyCtxt<'_>) -> ! {
|
|||
|
||||
let args = ::std::env::var("CG_CLIF_JIT_ARGS").unwrap_or_else(|_| String::new());
|
||||
let args = std::iter::once(&*tcx.crate_name(LOCAL_CRATE).as_str().to_string())
|
||||
.chain(args.split(" "))
|
||||
.chain(args.split(' '))
|
||||
.map(|arg| CString::new(arg).unwrap())
|
||||
.collect::<Vec<_>>();
|
||||
let mut argv = args.iter().map(|arg| arg.as_ptr()).collect::<Vec<_>>();
|
||||
|
@ -151,7 +151,7 @@ fn load_imported_symbols_for_jit(tcx: TyCtxt<'_>) -> Vec<(String, *const u8)> {
|
|||
}
|
||||
let dlsym_name = if cfg!(target_os = "macos") {
|
||||
// On macOS `dlsym` expects the name without leading `_`.
|
||||
assert!(name.starts_with("_"), "{:?}", name);
|
||||
assert!(name.starts_with('_'), "{:?}", name);
|
||||
&name[1..]
|
||||
} else {
|
||||
&name
|
||||
|
|
|
@ -64,11 +64,11 @@ fn codegen_mono_items<'tcx>(
|
|||
|
||||
for (mono_item, (linkage, visibility)) in mono_items {
|
||||
let linkage = crate::linkage::get_clif_linkage(mono_item, linkage, visibility);
|
||||
trans_mono_item(cx, mono_item, linkage);
|
||||
codegen_mono_item(cx, mono_item, linkage);
|
||||
}
|
||||
}
|
||||
|
||||
fn trans_mono_item<'tcx, M: Module>(
|
||||
fn codegen_mono_item<'tcx, M: Module>(
|
||||
cx: &mut crate::CodegenCx<'tcx, M>,
|
||||
mono_item: MonoItem<'tcx>,
|
||||
linkage: Linkage,
|
||||
|
@ -80,7 +80,7 @@ fn trans_mono_item<'tcx, M: Module>(
|
|||
crate::PrintOnPanic(|| format!("{:?} {}", inst, tcx.symbol_name(inst).name));
|
||||
debug_assert!(!inst.substs.needs_infer());
|
||||
tcx.sess
|
||||
.time("codegen fn", || crate::base::trans_fn(cx, inst, linkage));
|
||||
.time("codegen fn", || crate::base::codegen_fn(cx, inst, linkage));
|
||||
}
|
||||
MonoItem::Static(def_id) => {
|
||||
crate::constant::codegen_static(&mut cx.constants_cx, def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue