Bump Rust-BPF to v1.46 (#15273)
This commit is contained in:
@ -20,14 +20,6 @@ if ! command -v rustfilt > /dev/null; then
|
||||
echo "Error: rustfilt not found. It can be installed by running: cargo install rustfilt"
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v readelf > /dev/null; then
|
||||
if [[ $(uname) = Darwin ]]; then
|
||||
echo "Error: readelf not found. It can be installed by running: brew install binutils"
|
||||
else
|
||||
echo "Error: readelf not found."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
out_dir=$(dirname "$dump")
|
||||
@ -39,7 +31,7 @@ dump_mangled=$dump.mangled
|
||||
(
|
||||
set -ex
|
||||
ls -la "$so" > "$dump_mangled"
|
||||
readelf -aW "$so" >>"$dump_mangled"
|
||||
"$bpf_sdk"/dependencies/bpf-tools/llvm/bin/llvm-readelf -aW "$so" >>"$dump_mangled"
|
||||
"$OBJDUMP" -print-imm-hex --source --disassemble "$so" >> "$dump_mangled"
|
||||
sed s/://g < "$dump_mangled" | rustfilt > "$dump"
|
||||
)
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mkdir -p "$(dirname "$0")"/../dependencies
|
||||
cd "$(dirname "$0")"/../dependencies
|
||||
|
||||
if [[ "$(uname)" = Darwin ]]; then
|
||||
@ -128,57 +129,36 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
|
||||
touch criterion-$version.md
|
||||
fi
|
||||
|
||||
# Install LLVM
|
||||
version=v0.0.15
|
||||
if [[ ! -e llvm-native-$version.md || ! -e llvm-native ]]; then
|
||||
(
|
||||
set -e
|
||||
rm -rf llvm-native*
|
||||
rm -rf xargo
|
||||
job="download \
|
||||
https://github.com/solana-labs/llvm-builder/releases/download \
|
||||
$version \
|
||||
solana-llvm-$machine.tar.bz2 \
|
||||
llvm-native"
|
||||
get $version llvm-native "$job"
|
||||
)
|
||||
exitcode=$?
|
||||
if [[ $exitcode -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
touch llvm-native-$version.md
|
||||
fi
|
||||
|
||||
# Install Rust-BPF
|
||||
version=v0.2.5
|
||||
if [[ ! -e rust-bpf-$machine-$version.md || ! -e rust-bpf-$machine ]]; then
|
||||
version=v1.0
|
||||
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
|
||||
(
|
||||
set -e
|
||||
rm -rf rust-bpf-$machine*
|
||||
rm -rf bpf-tools*
|
||||
rm -rf xargo
|
||||
job="download \
|
||||
https://github.com/solana-labs/rust-bpf-builder/releases/download \
|
||||
https://github.com/solana-labs/bpf-tools/releases/download \
|
||||
$version \
|
||||
solana-rust-bpf-$machine.tar.bz2 \
|
||||
rust-bpf-$machine"
|
||||
get $version rust-bpf-$machine "$job"
|
||||
solana-bpf-tools-$machine.tar.bz2 \
|
||||
bpf-tools"
|
||||
get $version bpf-tools "$job"
|
||||
|
||||
set -ex
|
||||
./rust-bpf-$machine/bin/rustc --print sysroot
|
||||
./bpf-tools/rust/bin/rustc --print sysroot
|
||||
set +e
|
||||
rustup toolchain uninstall bpf
|
||||
set -e
|
||||
rustup toolchain link bpf rust-bpf-$machine
|
||||
rustup toolchain link bpf bpf-tools/rust
|
||||
)
|
||||
exitcode=$?
|
||||
if [[ $exitcode -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
touch rust-bpf-$machine-$version.md
|
||||
touch bpf-tools-$version.md
|
||||
fi
|
||||
|
||||
# Install Rust-BPF Sysroot sources
|
||||
version=v0.14
|
||||
version=v1.0
|
||||
if [[ ! -e rust-bpf-sysroot-$version.md || ! -e rust-bpf-sysroot ]]; then
|
||||
(
|
||||
set -e
|
||||
|
@ -20,4 +20,4 @@ out_dir=$(dirname "$so_stripped")
|
||||
if [[ ! -d $out_dir ]]; then
|
||||
mkdir -p "$out_dir"
|
||||
fi
|
||||
"$bpf_sdk"/dependencies/llvm-native/bin/llvm-objcopy --strip-all "$so" "$so_stripped"
|
||||
"$bpf_sdk"/dependencies/bpf-tools/llvm/bin/llvm-objcopy --strip-all "$so" "$so_stripped"
|
||||
|
Reference in New Issue
Block a user