Misc changes

This commit is contained in:
bjorn3 2018-11-03 15:04:27 +01:00
parent fc8a6c343a
commit c080c0bfec
2 changed files with 6 additions and 5 deletions

View File

@ -30,6 +30,7 @@ else
fi
export RUSTFLAGS='-Zalways-encode-mir -Cpanic=abort -Zcodegen-backend='$(pwd)'/target/'$channel'/librustc_codegen_cranelift.'$dylib_ext
export XARGO_RUST_SRC=$(pwd)'/target/libcore/src'
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
rm -r target/out || true
@ -52,7 +53,7 @@ time $RUSTC target/libcore/src/libcore/lib.rs --crate-type lib --crate-name core
pushd xargo
rm -r ~/.xargo/HOST || true
export XARGO_RUST_SRC=$(pwd)'/../target/libcore/src'
rm -r target || true
time xargo build --color always
popd

View File

@ -197,7 +197,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
let mut jit_module: Module<SimpleJITBackend> = Module::new(SimpleJITBuilder::new());
assert_eq!(pointer_ty(tcx), jit_module.target_config().pointer_type());
codegen_mono_items(tcx, &mut jit_module, &mono_items);
codegen_mono_items(tcx, &mut jit_module, mono_items);
tcx.sess.abort_if_errors();
println!("Compiled everything");
@ -238,7 +238,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
);
assert_eq!(pointer_ty(tcx), faerie_module.target_config().pointer_type());
codegen_mono_items(tcx, &mut faerie_module, &mono_items);
codegen_mono_items(tcx, &mut faerie_module, mono_items);
tcx.sess.abort_if_errors();
@ -342,7 +342,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
fn codegen_mono_items<'a, 'tcx: 'a>(
tcx: TyCtxt<'a, 'tcx, 'tcx>,
module: &mut Module<impl Backend + 'static>,
mono_items: &FxHashSet<MonoItem<'tcx>>,
mono_items: FxHashSet<MonoItem<'tcx>>,
) {
use std::io::Write;
@ -363,7 +363,7 @@ fn codegen_mono_items<'a, 'tcx: 'a>(
for mono_item in mono_items {
let res = ::std::panic::catch_unwind(::std::panic::AssertUnwindSafe(|| {
base::trans_mono_item(tcx, module, &mut caches, &mut ccx, *mono_item);
base::trans_mono_item(tcx, module, &mut caches, &mut ccx, mono_item);
}));
if let Err(err) = res {