From eaa3207af2c2e5aadf8b94cef4bb4ce2b6c722ec Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 2 Oct 2020 16:54:35 -0400 Subject: [PATCH] Update genbindings.sh somewhat for newer upstream --- genbindings.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.5