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"
|
2021-05-28 16:14:53 -07:00
|
|
|
|
2021-06-11 10:23:15 -07:00
|
|
|
export RUSTFLAGS="${RUSTFLAGS} -C lto=no"
|