Files
solana/instruction-processors/bpf/rust/noop/build.sh
Amr Ali 34344982a9 Rename programs to instruction_processors (#3789)
* Rename programs to instruction_processors

* Updates around the code base to support instruction_processors rename

* Kabab instruction_processors

* Update Cargo.toml files and scripts to use instruction-processors

* Update Cargo.toml to use instruction-processors

* Update CI scripts to use instruction-processors
2019-04-16 22:39:00 +02:00

28 lines
716 B
Bash
Executable File

#!/usr/bin/env bash
cd "$(dirname "$0")"
cargo install xargo
set -e
# Ensure the sdk is installed
../../../../sdk/bpf/scripts/install.sh
rustup override set bpf
export RUSTFLAGS="$RUSTFLAGS \
-C lto=no \
-C opt-level=2 \
-C link-arg=-Tbpf.ld \
-C link-arg=-z -C link-arg=notext \
-C link-arg=--Bdynamic \
-C link-arg=-shared \
-C link-arg=--entry=entrypoint \
-C linker=../../../../sdk/bpf/llvm-native/bin/ld.lld"
export XARGO_HOME="$PWD/target/xargo"
export XARGO_RUST_SRC="../../../../sdk/bpf/rust-bpf-sysroot/src"
# export XARGO_RUST_SRC="../../../../../rust-bpf-sysroot/src"
xargo build --target bpfel-unknown-unknown --release -v
{ { set +x; } 2>/dev/null; echo Success; }