]> git.bitcoin.ninja Git - ldk-java/commitdiff
Force CPU target to Sandy Bridge when compiling
authorMatt Corallo <git@bluematt.me>
Wed, 9 Jun 2021 01:48:07 +0000 (01:48 +0000)
committerMatt Corallo <git-ldk-build@bluematt.me>
Fri, 11 Jun 2021 19:53:28 +0000 (19:53 +0000)
See the similar commit on ldk-c-bindings for more info.

genbindings.sh

index cd549d792f9efb6bf7c8e9ddc8bb86e579a7f926..0cd88ba5e600c1de114eb5b3987a1cf44343a699 100755 (executable)
@@ -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