Update compiler_builtins

This commit is contained in:
bjorn3 2020-01-25 17:24:45 +01:00
parent 74c7a7b7c5
commit 8de317dd8f
2 changed files with 16 additions and 4 deletions

View File

@ -5,7 +5,7 @@ version = "0.0.0"
[dependencies]
core = { path = "./sysroot_src/src/libcore" }
compiler_builtins = "=0.1.20" # FIXME use "0.1" once libstd has updated for the latest version
compiler_builtins = "0.1"
alloc = { path = "./sysroot_src/src/liballoc" }
std = { path = "./sysroot_src/src/libstd", features = ["panic_unwind", "backtrace"] }
test = { path = "./sysroot_src/src/libtest" }

View File

@ -364,9 +364,21 @@ fn trans_mono_item<'clif, 'tcx, B: Backend + 'static>(
MonoItem::Static(def_id) => {
crate::constant::codegen_static(&mut cx.constants_cx, def_id);
}
MonoItem::GlobalAsm(node_id) => tcx
.sess
.fatal(&format!("Unimplemented global asm mono item {:?}", node_id)),
MonoItem::GlobalAsm(hir_id) => {
let item = tcx.hir().expect_item(hir_id);
if let rustc_hir::ItemKind::GlobalAsm(rustc_hir::GlobalAsm { asm }) = item.kind {
// FIXME implement global asm using an external assembler
if asm.as_str().contains("__rust_probestack") {
return;
} else {
tcx
.sess
.fatal(&format!("Unimplemented global asm mono item \"{}\"", asm));
}
} else {
bug!("Expected GlobalAsm found {:?}", item);
}
}
}
}