From: Matt Corallo Date: Fri, 12 Mar 2021 16:47:00 +0000 (-0500) Subject: Move .so output to different names based on release/debug flag X-Git-Tag: v0.0.98~10^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d58fdeb629a085aafc3f616172336f12a9c323fa;p=ldk-java Move .so output to different names based on release/debug flag --- diff --git a/genbindings.sh b/genbindings.sh index 2006499e..a6d8fa7c 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -31,11 +31,11 @@ javac -h src/main/jni src/main/java/org/ldk/enums/*.java src/main/java/org/ldk/i rm src/main/java/org/ldk/enums/*.class src/main/java/org/ldk/impl/bindings*.class echo "Building Java bindings..." -COMPILE="$COMMON_COMPILE -Isrc/main/jni -pthread -ldl -Wl,--no-undefined -o liblightningjni.so -shared -fPIC" +COMPILE="$COMMON_COMPILE -Isrc/main/jni -pthread -ldl -Wl,--no-undefined -shared -fPIC" if [ "$3" = "true" ]; then - $COMPILE -g -fsanitize=address -shared-libasan -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,reallocarray -Wl,-wrap,malloc -Wl,-wrap,free -rdynamic -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c "$1"/lightning-c-bindings/target/debug/libldk.a -lm + $COMPILE -o liblightningjni_debug.so -g -fsanitize=address -shared-libasan -Wl,-wrap,calloc -Wl,-wrap,realloc -Wl,-wrap,reallocarray -Wl,-wrap,malloc -Wl,-wrap,free -rdynamic -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c "$1"/lightning-c-bindings/target/debug/libldk.a -lm else - $COMPILE -Wl,--version-script=libcode.version -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 + $COMPILE -o liblightningjni_release.so -Wl,--version-script=libcode.version -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 echo "Creating TS bindings..." diff --git a/liblightningjni.so b/liblightningjni.so deleted file mode 100755 index 3db2dbaf..00000000 Binary files a/liblightningjni.so and /dev/null differ diff --git a/liblightningjni.so b/liblightningjni.so new file mode 120000 index 00000000..1b6bb881 --- /dev/null +++ b/liblightningjni.so @@ -0,0 +1 @@ +liblightningjni_release.so \ No newline at end of file diff --git a/liblightningjni_release.so b/liblightningjni_release.so new file mode 100755 index 00000000..3db2dbaf Binary files /dev/null and b/liblightningjni_release.so differ