]> git.bitcoin.ninja Git - ldk-java/commitdiff
Move .so output to different names based on release/debug flag
authorMatt Corallo <git@bluematt.me>
Fri, 12 Mar 2021 16:47:00 +0000 (11:47 -0500)
committerMatt Corallo <git@bluematt.me>
Fri, 12 Mar 2021 16:48:36 +0000 (11:48 -0500)
genbindings.sh
liblightningjni.so [changed from file to symlink]
liblightningjni_release.so [new file with mode: 0755]

index 2006499e83b2029680a2d7c0f9a27e797801a37c..a6d8fa7c72f7f2a9e682a80b621d36ef5e94eb64 100755 (executable)
@@ -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..."
deleted file mode 100755 (executable)
index 3db2dbafce8056b02fb92c245211d7994f1b668b..0000000000000000000000000000000000000000
Binary files a/liblightningjni.so and /dev/null differ
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..1b6bb88177eefb638eac652bc7a1f1d02e0a7582
--- /dev/null
@@ -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 (executable)
index 0000000..3db2dba
Binary files /dev/null and b/liblightningjni_release.so differ