about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-09-23 18:34:54 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2020-09-23 18:34:54 +0200
commitd68b50efb306f102bb06f15c044facc3c287cd6c (patch)
tree9b24cd269230c186abcfd275fe4ecf6edd60885e
parent8a59808b24a728a7034bd697206c4921211569ba (diff)
downloadrust-d68b50efb306f102bb06f15c044facc3c287cd6c.tar.gz
rust-d68b50efb306f102bb06f15c044facc3c287cd6c.zip
Small change to test script
-rw-r--r--scripts/config.sh2
-rwxr-xr-xtest.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/config.sh b/scripts/config.sh
index 93db4a54a56..b6479e4f696 100644
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -17,7 +17,9 @@ TARGET_TRIPLE=$HOST_TRIPLE
 
 linker=''
 RUN_WRAPPER=''
+export JIT_SUPPORTED=1
 if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
+   export JIT_SUPPORTED=0
    if [[ "$TARGET_TRIPLE" == "aarch64-unknown-linux-gnu" ]]; then
       # We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
       linker='-Clinker=aarch64-linux-gnu-gcc'
diff --git a/test.sh b/test.sh
index 055ebfd8c72..ef50a4fc729 100755
--- a/test.sh
+++ b/test.sh
@@ -26,7 +26,7 @@ $RUSTC example/mini_core.rs --crate-name mini_core --crate-type lib,dylib --targ
 echo "[BUILD] example"
 $RUSTC example/example.rs --crate-type lib --target $TARGET_TRIPLE
 
-if [[ "$HOST_TRIPLE" = "$TARGET_TRIPLE" ]]; then
+if [[ "$JIT_SUPPORTED" = "1" ]]; then
     echo "[JIT] mini_core_hello_world"
     CG_CLIF_JIT=1 CG_CLIF_JIT_ARGS="abc bcd" $RUSTC --crate-type bin -Cprefer-dynamic example/mini_core_hello_world.rs --cfg jit --target $HOST_TRIPLE
 else
@@ -49,7 +49,7 @@ echo "[AOT] alloc_example"
 $RUSTC example/alloc_example.rs --crate-type bin --target $TARGET_TRIPLE
 $RUN_WRAPPER ./target/out/alloc_example
 
-if [[ "$HOST_TRIPLE" = "$TARGET_TRIPLE" ]]; then
+if [[ "$JIT_SUPPORTED" = "1" ]]; then
     echo "[JIT] std_example"
     CG_CLIF_JIT=1 $RUSTC --crate-type bin -Cprefer-dynamic example/std_example.rs --target $HOST_TRIPLE
 else