source config.sh
-jit() {
- if [[ `uname` == 'Darwin' ]]; then
- # FIXME(#671) `dlsym` returns "symbol not found" for existing symbols on macOS.
- echo "[JIT] $1 (Ignored on macOS)"
- else
- echo "[JIT] $1"
- SHOULD_RUN=1 $RUSTC --crate-type bin -Cprefer-dynamic $2
- fi
-}
-
rm -r target/out || true
mkdir -p target/out/clif
echo "[BUILD] example"
$RUSTC example/example.rs --crate-type lib
-#JIT_ARGS="abc bcd" jit mini_core_hello_world example/mini_core_hello_world.rs
+echo "[JIT] mini_core_hello_world"
+JIT_ARGS="abc bcd" SHOULD_RUN=1 $RUSTC --crate-type bin -Cprefer-dynamic example/mini_core_hello_world.rs
echo "[AOT] mini_core_hello_world"
$RUSTC example/mini_core_hello_world.rs --crate-name mini_core_hello_world --crate-type bin -g
$RUSTC example/alloc_example.rs --crate-type bin
./target/out/alloc_example
-jit std_example example/std_example.rs
+echo "[JIT] std_example"
+SHOULD_RUN=1 $RUSTC --crate-type bin -Cprefer-dynamic example/std_example.rs
echo "[AOT] dst_field_align"
# FIXME Re-add -Zmir-opt-level=2 once rust-lang/rust#67529 is fixed.