about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/scripts/cargo.sh
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-11-03 11:00:04 +0100
commit216c4ae46352330bc7962f132fe226a7e73ab8fa (patch)
treec1d7af49fa1f27f325f090cff3f2d8861972fec9 /compiler/rustc_codegen_cranelift/scripts/cargo.sh
parenta6403b0f04b58a35cb9f3e544b2847ee09bcf3a4 (diff)
parent03f01bbe901d60b71cf2c5ec766aef5e532ab79d (diff)
downloadrust-216c4ae46352330bc7962f132fe226a7e73ab8fa.tar.gz
rust-216c4ae46352330bc7962f132fe226a7e73ab8fa.zip
Merge commit '03f01bbe901d60b71cf2c5ec766aef5e532ab79d' into update_cg_clif-2020-11-01
Diffstat (limited to 'compiler/rustc_codegen_cranelift/scripts/cargo.sh')
-rwxr-xr-xcompiler/rustc_codegen_cranelift/scripts/cargo.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_cranelift/scripts/cargo.sh b/compiler/rustc_codegen_cranelift/scripts/cargo.sh
new file mode 100755
index 00000000000..e63daa40f35
--- /dev/null
+++ b/compiler/rustc_codegen_cranelift/scripts/cargo.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+dir=$(dirname "$0")
+source $dir/config.sh
+
+# read nightly compiler from rust-toolchain file
+TOOLCHAIN=$(cat $dir/rust-toolchain)
+
+cmd=$1
+shift || true
+
+if [[ "$cmd" = "jit" ]]; then
+cargo +${TOOLCHAIN} rustc $@ -- --jit
+else
+cargo +${TOOLCHAIN} $cmd $@
+fi