From ecd2d7b6a1e1210ede3c6cb7ff903347eb4b1424 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 28 Aug 2020 23:34:37 -0400 Subject: [PATCH] Update linking for address sanitizer --- genbindings.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5