Change build.sh a bit

This commit is contained in:
bjorn3
2018-08-13 19:40:40 +02:00
parent b9d7164eff
commit 257a607e3e
2 changed files with 8 additions and 10 deletions

View File

@@ -2,8 +2,6 @@
cargo build || exit 1 cargo build || exit 1
cd examples/
unamestr=`uname` unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then if [[ "$unamestr" == 'Linux' ]]; then
dylib_ext='so' dylib_ext='so'
@@ -14,12 +12,12 @@ else
exit 1 exit 1
fi fi
RUSTC="rustc -Zcodegen-backend=$(pwd)/../target/debug/librustc_codegen_cranelift.$dylib_ext -L crate=." RUSTC="rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.$dylib_ext -L crate=."
$RUSTC mini_core.rs --crate-name mini_core --crate-type lib && $RUSTC examples/mini_core.rs --crate-name mini_core --crate-type lib &&
$RUSTC example.rs --crate-type lib && $RUSTC examples/example.rs --crate-type lib &&
$RUSTC mini_core_hello_world.rs --crate-type bin && $RUSTC examples/mini_core_hello_world.rs --crate-type bin &&
$RUSTC ../target/libcore/src/libcore/lib.rs --color=always --crate-type lib -Cincremental=../target/libcore/incremental 2>&1 | (head -n 20; echo "===="; tail -n 1000) $RUSTC target/libcore/src/libcore/lib.rs --color=always --crate-type lib -Cincremental=target/libcore/incremental 2>&1 | (head -n 20; echo "===="; tail -n 1000)
cat ../target/log.txt | sort | uniq -c | grep -v "rval unsize move" | grep -v "rval len" cat target/log.txt | sort | uniq -c | grep -v "rval unsize move" | grep -v "rval len"
rm *.rlib ../target/log.txt rm *.rlib target/log.txt

View File

@@ -255,7 +255,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
defined_functions: Vec::new(), defined_functions: Vec::new(),
}; };
let mut log = ::std::fs::File::create("../target/log.txt").unwrap(); let mut log = ::std::fs::File::create("target/log.txt").unwrap();
let before = ::std::time::Instant::now(); let before = ::std::time::Instant::now();
let mono_items = let mono_items =