From 4cce83dc0f9446944e3c73f9ecc9689c9073ef70 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 9 Jun 2021 01:48:07 +0000 Subject: [PATCH] Force CPU target to Sandy Bridge when compiling See the similar commit on ldk-c-bindings for more info. --- genbindings.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genbindings.sh b/genbindings.sh index cd549d79..0cd88ba5 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -46,7 +46,7 @@ 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 -shared -fPIC" +COMPILE="$COMMON_COMPILE -march=sandybridge -Isrc/main/jni -pthread -ldl -Wl,--no-undefined -shared -fPIC" if [ "$3" = "true" ]; then $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 -- 2.39.5