Misc changes
This commit is contained in:
3
build.sh
3
build.sh
@@ -30,6 +30,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
export RUSTFLAGS='-Zalways-encode-mir -Cpanic=abort -Zcodegen-backend='$(pwd)'/target/'$channel'/librustc_codegen_cranelift.'$dylib_ext
|
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"
|
RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
|
||||||
|
|
||||||
rm -r target/out || true
|
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
|
pushd xargo
|
||||||
rm -r ~/.xargo/HOST || true
|
rm -r ~/.xargo/HOST || true
|
||||||
export XARGO_RUST_SRC=$(pwd)'/../target/libcore/src'
|
rm -r target || true
|
||||||
time xargo build --color always
|
time xargo build --color always
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||||||
let mut jit_module: Module<SimpleJITBackend> = Module::new(SimpleJITBuilder::new());
|
let mut jit_module: Module<SimpleJITBackend> = Module::new(SimpleJITBuilder::new());
|
||||||
assert_eq!(pointer_ty(tcx), jit_module.target_config().pointer_type());
|
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();
|
tcx.sess.abort_if_errors();
|
||||||
println!("Compiled everything");
|
println!("Compiled everything");
|
||||||
@@ -238,7 +238,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||||||
);
|
);
|
||||||
assert_eq!(pointer_ty(tcx), faerie_module.target_config().pointer_type());
|
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();
|
tcx.sess.abort_if_errors();
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
|
|||||||
fn codegen_mono_items<'a, 'tcx: 'a>(
|
fn codegen_mono_items<'a, 'tcx: 'a>(
|
||||||
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
module: &mut Module<impl Backend + 'static>,
|
module: &mut Module<impl Backend + 'static>,
|
||||||
mono_items: &FxHashSet<MonoItem<'tcx>>,
|
mono_items: FxHashSet<MonoItem<'tcx>>,
|
||||||
) {
|
) {
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ fn codegen_mono_items<'a, 'tcx: 'a>(
|
|||||||
|
|
||||||
for mono_item in mono_items {
|
for mono_item in mono_items {
|
||||||
let res = ::std::panic::catch_unwind(::std::panic::AssertUnwindSafe(|| {
|
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 {
|
if let Err(err) = res {
|
||||||
|
|||||||
Reference in New Issue
Block a user