From: Matt Corallo Date: Wed, 9 Jun 2021 01:48:07 +0000 (+0000) Subject: Force CPU target to Sandy Bridge when compiling X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4cce83dc0f9446944e3c73f9ecc9689c9073ef70;p=ldk-java Force CPU target to Sandy Bridge when compiling See the similar commit on ldk-c-bindings for more info. --- 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