ci: build ndn-cxx with AddressSanitizer
Change-Id: I706ab29efe61c17511b87b477151d9a2a8e055bc
diff --git a/.jenkins.d/01-ndn-cxx.sh b/.jenkins.d/01-ndn-cxx.sh
index 3249e4c..7bf1cfe 100755
--- a/.jenkins.d/01-ndn-cxx.sh
+++ b/.jenkins.d/01-ndn-cxx.sh
@@ -35,11 +35,16 @@
pushd ndn-cxx >/dev/null
+if has Linux $NODE_LABELS && [[ $CXX != clang* && -z $DISABLE_ASAN ]]; then
+ # https://stackoverflow.com/a/47022141
+ ASAN="--with-sanitizer=address"
+fi
if has CentOS-8 $NODE_LABELS; then
+ # https://bugzilla.redhat.com/show_bug.cgi?id=1721553
PCH="--without-pch"
fi
-./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $PCH
+./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain $ASAN $PCH
./waf --color=yes build -j$WAF_JOBS
sudo_preserve_env PATH -- ./waf --color=yes install