From 7d7c8d61b2027f15e2aee66752a542311dca6bc5 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 19 Feb 2024 18:45:28 +0000 Subject: [PATCH] Disable LTO, which seems to be failing for an unknown reason --- genbindings.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/genbindings.sh b/genbindings.sh index fbc237f7..57ed3278 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -273,10 +273,7 @@ else if [ "$3" = "true" ]; then $COMPILE $LINK -o liblightningjni_debug$LDK_TARGET_SUFFIX.so -g -fsanitize=address -shared-libasan -rdynamic -I"$1"/lightning-c-bindings/include/ $2 src/main/jni/bindings.c "$1"/lightning-c-bindings/target/$LDK_TARGET/debug/libldk.a -lm else - [ "$IS_MAC" = "false" ] && LINK="$LINK -Wl,--no-undefined -flto -Wl,-O3 -Wl,--lto-O3" - [ "$IS_MAC" = "false" ] && COMPILE="$COMPILE -flto" - [ "$IS_MAC" = "true" -a "$IS_APPLE_CLANG" = "false" ] && LINK="$LINK -flto -Wl,-O3 -Wl,--lto-O3" - [ "$IS_MAC" = "true" -a "$IS_APPLE_CLANG" = "false" ] && COMPILE="$COMPILE -flto" + [ "$IS_MAC" = "false" ] && LINK="$LINK -Wl,--no-undefined" LDK_LIB="$1"/lightning-c-bindings/target/$LDK_TARGET/release/libldk.a if [ "$IS_MAC" = "false" -a "$4" = "false" ]; then LINK="$LINK -Wl,--version-script=libcode.version -fuse-ld=lld" -- 2.39.5