From: Matt Corallo Date: Sat, 29 Aug 2020 03:34:37 +0000 (-0400) Subject: Update linking for address sanitizer X-Git-Tag: v0.0.1~156 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=ecd2d7b6a1e1210ede3c6cb7ff903347eb4b1424;p=ldk-java Update linking for address sanitizer --- diff --git a/genbindings.sh b/genbindings.sh index e6527885..09e03bdd 100755 --- a/genbindings.sh +++ b/genbindings.sh @@ -8,5 +8,5 @@ set -e ./genbindings.py "$1/lightning-c-bindings/include/lightning.h" src/main/java/org/ldk/impl/bindings.java src/main/jni/bindings.c javac -h src/main/jni src/main/java/org/ldk/impl/bindings.java rm src/main/java/org/ldk/impl/bindings*.class -clang -Wall -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/debug/liblightning.a -#clang -Wall -flto -fuse-ld=lld -O2 -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/release/liblightning.a +clang -pthread -ldl -fsanitize=address -Wall -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/debug/liblightning.a +#clang -Wl,--no-undefined -shared-libasan -pthread -ldl -Wall -flto -fuse-ld=lld -O2 -o liblightningjni.so -shared -fPIC -Wno-pointer-sign -Isrc/main/jni -I"$1/lightning-c-bindings/include/" $2 src/main/jni/bindings.c "$1"/target/release/liblightning.a