Skip to content

Commit cf3abf2

Browse files
committed
Add install flags for better dylib bindings
1 parent cf009b9 commit cf3abf2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM rust:1.38
22

3+
# Usage: docker run --rm -v $(pwd):/code confio/go-cosmwasm:demo /root/build_osx.sh
4+
35
# Install build dependencies
46
RUN apt-get update
57
RUN apt install -y clang gcc g++ zlib1g-dev libmpc-dev libmpfr-dev libgmp-dev

build/build_osx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ export LIBZ_SYS_STATIC=1
66
export CC=o64-clang
77
export CXX=o64-clang++
88

9-
cargo build --release --target x86_64-apple-darwin --features force-osx-x86-64
9+
RUSTFLAGS="-C link-args=-Wl,-install_name,@rpath/libgo_cosmwasm.dylib" cargo build --release --target x86_64-apple-darwin --features force-osx-x86-64
1010
cp target/x86_64-apple-darwin/release/deps/libgo_cosmwasm.dylib api

0 commit comments

Comments
 (0)