solana/sdk/bpf/env.sh

19 lines
522 B
Bash
Raw Normal View History

2020-10-20 17:50:20 -07:00
#
# Configures the BPF SDK environment
#
if [ -z "$bpf_sdk" ]; then
bpf_sdk=.
fi
# Ensure the sdk is installed
"$bpf_sdk"/scripts/install.sh
# Use the SDK's version of llvm to build the compiler-builtins for BPF
2021-02-18 11:30:08 -08:00
export CC="$bpf_sdk/dependencies/bpf-tools/llvm/bin/clang"
export AR="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-ar"
export OBJDUMP="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objdump"
export OBJCOPY="$bpf_sdk/dependencies/bpf-tools/llvm/bin/llvm-objcopy"
export RUSTFLAGS="${RUSTFLAGS} -C lto=no"