Update Rust program build script paths (#4707)
This commit is contained in:
parent
5e8fcdbe1d
commit
de3f7e9634
|
@ -1,3 +1,4 @@
|
|||
/dependencies/criterion*
|
||||
/dependencies/llvm-native*
|
||||
/dependencies/rust-bpf*
|
||||
/dependencies/xargo*
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ if [[ ! -f llvm-native-$machine-$version.md ]]; then
|
|||
|
||||
set -ex
|
||||
rm -rf llvm-native*
|
||||
rm -rf xargo
|
||||
mkdir -p llvm-native
|
||||
cd llvm-native
|
||||
|
||||
|
@ -81,6 +82,7 @@ if [[ ! -f rust-bpf-$machine-$version.md ]]; then
|
|||
set -ex
|
||||
rm -rf rust-bpf
|
||||
rm -rf rust-bpf-$machine-*
|
||||
rm -rf xargo
|
||||
mkdir -p rust-bpf
|
||||
pushd rust-bpf
|
||||
|
||||
|
@ -113,6 +115,7 @@ if [[ ! -f rust-bpf-sysroot-$version.md ]]; then
|
|||
(
|
||||
set -ex
|
||||
rm -rf rust-bpf-sysroot*
|
||||
rm -rf xargo
|
||||
cmd="git clone --recursive --single-branch --branch $version https://github.com/solana-labs/rust-bpf-sysroot.git"
|
||||
$cmd
|
||||
|
||||
|
|
Loading…
Reference in New Issue