Use -Cprefer-dynamic for all crates in jit mode

This commit is contained in:
bjorn3 2021-06-10 10:46:00 +02:00
parent 84dd22969f
commit ae1bcb209a

View File

@ -10,9 +10,9 @@ cmd=$1
shift || true
if [[ "$cmd" = "jit" ]]; then
cargo "+${TOOLCHAIN}" rustc "$@" -- -Cllvm-args=mode=jit -Cprefer-dynamic
RUSTFLAGS="-Cprefer-dynamic" cargo "+${TOOLCHAIN}" rustc "$@" -- -Cllvm-args=mode=jit
elif [[ "$cmd" = "lazy-jit" ]]; then
cargo "+${TOOLCHAIN}" rustc "$@" -- -Cllvm-args=mode=jit-lazy -Cprefer-dynamic
RUSTFLAGS="-Cprefer-dynamic" cargo "+${TOOLCHAIN}" rustc "$@" -- -Cllvm-args=mode=jit-lazy
else
cargo "+${TOOLCHAIN}" "$cmd" "$@"
fi