Skip to content

Commit 3a46596

Browse files
author
Guillermo Bescos
committed
Fix build
1 parent 6967eb2 commit 3a46596

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

program/rust/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod build_utils;
22
use bindgen::Builder;
33

44
fn main() {
5-
println!("cargo:rustc-link-search=../c/target");
5+
println!("cargo:rustc-link-search=./program/c/target");
66

77
let borsh_derives = ["BorshSerialize".to_string(), "BorshDeserialize".to_string()];
88

scripts/build-bpf.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ PYTH_DIR=$( cd "${1:-.}" && pwd)
1515
C_DIR="$( find $PYTH_DIR | grep makefile)"
1616
C_DIR=$(dirname $C_DIR)
1717

18-
#finds Cargo.toml in pyth-client
19-
#ASSUMES THAT there is only one Cargo.toml there
20-
RUST_DIR="$( find $PYTH_DIR | grep Cargo.toml )"
21-
RUST_DIR=$(dirname $RUST_DIR)
22-
2318
if ! which cargo 2> /dev/null
2419
then
2520
# shellcheck disable=SC1090
@@ -39,16 +34,13 @@ rm ./target/*-keypair.json
3934

4035

4136
#build Rust and link it with C
42-
cd "${RUST_DIR}"
37+
cd "${PYTH_DIR}"
4338
cargo clean
4439
cargo test
4540
cargo clean
4641
cargo build-bpf
4742

4843
sha256sum ./target/**/*.so
49-
rm ./target/**/*-keypair.json
50-
rm -r $PYTH_DIR/target || true
51-
mv ./target $PYTH_DIR/target
5244

5345

5446

0 commit comments

Comments
 (0)