From: Matt Corallo Date: Fri, 2 Oct 2020 20:54:35 +0000 (-0400) Subject: Update genbindings.sh somewhat for newer upstream X-Git-Tag: v0.0.1~143 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=eaa3207af2c2e5aadf8b94cef4bb4ce2b6c722ec;p=ldk-java Update genbindings.sh somewhat for newer upstream --- diff --git a/genbindings.sh b/genbindings.sh index ddd0ed01..ab04c9ce 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -12,8 +12,9 @@ set -e ./genbindings.py "$1/lightning-c-bindings/include/lightning.h" src/main/java/org/ldk/impl/bindings.java src/main/jni/bindings.c $3 javac -h src/main/jni src/main/java/org/ldk/impl/bindings.java rm src/main/java/org/ldk/impl/bindings*.class +COMPILE="clang -std=c11 -Wall -Wno-unused-function -Wl,--no-undefined -pthread -ldl -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni" if [ "$3" = "true" ]; then - clang -std=c11 -Wall -Wno-unused-function -g -pthread -ldl -fsanitize=address -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/debug/liblightning.a + $COMPILE -g -fsanitize=address -shared-libasan -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c "$1"/lightning-c-bindings/target/debug/libldk.a else - clang -Wall -Wno-unused-function -Wl,--no-undefined -shared-libasan -pthread -ldl -flto -fuse-ld=lld -O2 -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/release/liblightning.a + $COMPILE -flto -fuse-ld=lld -O3 -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c "$1"/lightning-c-bindings/target/release/libldk.a fi