Browse Source

check if lld is available before using in RUSTFLAGS

master
Jonathan Strong 2 years ago
parent
commit
4f974b48fe
  1. 9
      justfile

9
justfile

@ -1,14 +1,9 @@
# load any variables in .env
set dotenv-load := true
# version of rustc used for cargo commands
rustc-version := "nightly"
# name of crate registry to publish versions of this tool to
publish-registry := "shipyard-rs-public"
# env settings exported for cargo settings
export RUSTFLAGS := "-C link-arg=-fuse-ld=lld -C target-cpu=native"
# complicated/ugly one-liner to use lld linker if it's available
export RUSTFLAGS := `LLD=$(which lld) && test $? -eq "0" && echo "-C link-arg=-fuse-ld=lld" || echo ''`
# cargo wrapper; executes a cargo command using the settings in justfile (RUSTFLAGS, etc.)
cargo +args='':

Loading…
Cancel
Save