dont set rustflags when no specific linker needed

This commit is contained in:
Paris DOUADY 2021-01-30 16:25:48 +01:00
parent ae6daf77ba
commit 3eb649c631

View File

@ -44,7 +44,11 @@ fi
dir=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)
export RUSTC=$dir"/bin/cg_clif"
export RUSTFLAGS=$linker" "$RUSTFLAGS
if [ ! -z $linker ]; then
export RUSTFLAGS=$linker" "$RUSTFLAGS
fi
export RUSTDOCFLAGS=$linker' -Cpanic=abort -Zpanic-abort-tests '\
'-Zcodegen-backend='$dir'/lib/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$dir