]> git.bitcoin.ninja Git - ldk-java/commitdiff
Strip LLVM BC from resulting binaries v0.0.121.1
authorMatt Corallo <git@bluematt.me>
Thu, 1 Feb 2024 21:53:16 +0000 (21:53 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 1 Feb 2024 21:53:16 +0000 (21:53 +0000)
genbindings.sh

index 8f70a8e8eadca548f10437d0bb732f38d165a168..2b78dc7477c3c84fa8fd5fe9035d59ed2c2b78f5 100755 (executable)
@@ -175,7 +175,7 @@ if [ "$2" = "c_sharp" ]; then
                # so we have to build with faketime.
                faketime -f "2021-01-01 00:00:00" $COMPILE -o bindings.o -c -O3 -I"$1"/lightning-c-bindings/include/ c_sharp/bindings.c
                faketime -f "2021-01-01 00:00:00" $COMPILE $LINK -o libldkcsharp_release$LDK_TARGET_SUFFIX.so -O3 bindings.o $LDK_LIB -lm
-               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip libldkcsharp_release$LDK_TARGET_SUFFIX.so
+               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip -R .llvmbc -R .llvmcmd libldkcsharp_release$LDK_TARGET_SUFFIX.so
 
                if [ "$LDK_JAR_TARGET" = "true" ]; then
                        # Copy resulting native binary for inclusion in release nuget zip
@@ -229,7 +229,7 @@ elif [ "$2" = "python" ]; then
        else
                $COMPILE -o bindings.o -c -flto -O3 -I"$1"/lightning-c-bindings/include/ $2 c_sharp/bindings.c
                $COMPILE $LINK -o liblightningpython_release$LDK_TARGET_SUFFIX.so -Wl,--version-script=python/libcode.version -flto -O3 -Wl,--lto-O3 -Wl,-O3 -I"$1"/lightning-c-bindings/include/ $2 bindings.o "$1"/lightning-c-bindings/target/$LDK_TARGET/release/libldk.a -lm
-               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip liblightningpython_release$LDK_TARGET_SUFFIX.so
+               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip -R .llvmbc -R .llvmcmd liblightningpython_release$LDK_TARGET_SUFFIX.so
        fi
 elif [ "$2" = "wasm" ]; then
        echo "Creating TS bindings..."
@@ -345,7 +345,7 @@ else
 
                $COMPILE -o bindings.o -c -O3 -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c
                $COMPILE $LINK -o liblightningjni_release$LDK_TARGET_SUFFIX.so -O3 $2 bindings.o $LDK_LIB -lm
-               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip liblightningjni_release$LDK_TARGET_SUFFIX.so
+               [ "$IS_APPLE_CLANG" != "true" ] && llvm-strip -R .llvmbc -R .llvmcmd liblightningjni_release$LDK_TARGET_SUFFIX.so
 
                if [ "$IS_MAC" = "false" -a "$4" = "false" ]; then
                        GLIBC_SYMBS="$(objdump -T liblightningjni_release$LDK_TARGET_SUFFIX.so | grep GLIBC_ | grep -v "GLIBC_2\.\(2\|3\)\(\.\|)\)" | grep -v "GLIBC_2.\(3\.4\|14\|17\|18\|25\|28\|29\|32\|33\|34\|\))" || echo)"