]> git.lizzy.rs Git - rust.git/blobdiff - test.sh
Fix JIT on macOS
[rust.git] / test.sh
diff --git a/test.sh b/test.sh
index 72934e689584f59cc0630c1073241cf3dcae15a6..e1cb1333649c3deadbc8895ab34fa83373c415e3 100755 (executable)
--- a/test.sh
+++ b/test.sh
@@ -12,16 +12,6 @@ fi
 
 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
 
@@ -31,7 +21,8 @@ $RUSTC example/mini_core.rs --crate-name mini_core --crate-type lib,dylib
 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
@@ -49,7 +40,8 @@ echo "[AOT] alloc_example"
 $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.