diff --git a/expat/qa.sh b/expat/qa.sh index f745707c..5dd39512 100755 --- a/expat/qa.sh +++ b/expat/qa.sh @@ -57,6 +57,11 @@ populate_environment() { # http://clang.llvm.org/docs/AddressSanitizer.html BASE_COMPILE_FLAGS+=" -g -fsanitize=address -fno-omit-frame-pointer -fno-common" BASE_LINK_FLAGS+=" -g -fsanitize=address" + # macOS's XCode does not support LeakSanitizer and reports error: + # AddressSanitizer: detect_leaks is not supported on this platform. + if [[ "$(uname -s)" != Darwin* ]]; then + export ASAN_OPTIONS=detect_leaks=1 + fi ;; memory) # http://clang.llvm.org/docs/MemorySanitizer.html