roc/ci/enable-lld.sh
2022-10-17 17:40:35 +02:00

10 lines
298 B
Bash
Executable File

#!/usr/bin/env bash
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euxo pipefail
mkdir -p $HOME/.cargo
echo -e "[build]\nrustflags = [\"-C\", \"link-arg=-fuse-ld=lld\", \"-C\", \"target-cpu=native\"]" > $HOME/.cargo/config
ln -s /usr/bin/lld-8 /usr/local/bin/ld.lld