Update Rust program build script paths (#4707)

This commit is contained in:
Jack May
2019-06-17 14:24:00 -07:00
committed by GitHub
parent 5e8fcdbe1d
commit de3f7e9634
3 changed files with 7 additions and 2 deletions

View File

@ -9,9 +9,9 @@ if [ ! -f "$1/Cargo.toml" ]; then
exit 1
fi
cd "$(dirname "$0")"
pushd "$(dirname "$0")"
bpf_sdk="$PWD/.."
export XARGO_HOME="$PWD/../../../target/xargo"
popd
cd "$1"
@ -37,6 +37,7 @@ export RUSTFLAGS="
-C link-arg=-shared \
-C link-arg=--entry=entrypoint \
-C linker=$bpf_sdk/dependencies/llvm-native/bin/ld.lld"
export XARGO_HOME="$bpf_sdk/dependencies/xargo"
export XARGO_RUST_SRC="$bpf_sdk/dependencies/rust-bpf-sysroot/src"
xargo build --target bpfel-unknown-unknown --release -v