2018-08-10 19:09:21 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-06-17 18:05:11 +02:00
|
|
|
cargo build || exit 1
|
|
|
|
|
2018-07-30 18:20:37 +02:00
|
|
|
cd examples/
|
2018-07-20 13:38:49 +02:00
|
|
|
|
2018-08-08 19:46:16 +02:00
|
|
|
unamestr=`uname`
|
|
|
|
if [[ "$unamestr" == 'Linux' ]]; then
|
|
|
|
dylib_ext='so'
|
|
|
|
elif [[ "$unamestr" == 'Darwin' ]]; then
|
|
|
|
dylib_ext='dylib'
|
|
|
|
else
|
|
|
|
echo "Unsupported os"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-08-13 19:14:55 +02:00
|
|
|
RUSTC="rustc -Zcodegen-backend=$(pwd)/../target/debug/librustc_codegen_cranelift.$dylib_ext -L crate=."
|
2018-07-30 18:20:37 +02:00
|
|
|
|
2018-08-11 15:05:57 +02:00
|
|
|
$RUSTC mini_core.rs --crate-name mini_core --crate-type lib &&
|
|
|
|
$RUSTC example.rs --crate-type lib &&
|
|
|
|
$RUSTC mini_core_hello_world.rs --crate-type bin &&
|
2018-07-30 18:20:37 +02:00
|
|
|
|
2018-08-12 20:49:43 +02:00
|
|
|
$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)
|
2018-08-09 15:30:26 +02:00
|
|
|
cat ../target/log.txt | sort | uniq -c | grep -v "rval unsize move" | grep -v "rval len"
|
|
|
|
rm *.rlib ../target/log.txt
|