Add wxGTK build with ASAN to Travis CI

Compile and link with `-fsanitize=address` options to find memory related
errors.
This commit is contained in:
Ilya Sinitsyn
2020-10-13 20:26:58 +07:00
committed by Vadim Zeitlin
parent fe7230e19c
commit 0310347dc4
3 changed files with 41 additions and 1 deletions

View File

@@ -21,6 +21,11 @@ case $wxTOOLSET in
fi
cmake --version
if [ "$wxUSE_ASAN" = 1 ]; then
echo "ASAN currently isn't supported in CMake builds"
exit 1
fi
echo 'travis_fold:start:configure'
echo 'Configuring...'
mkdir build_cmake
@@ -61,7 +66,20 @@ case $wxTOOLSET in
*)
echo 'travis_fold:start:configure'
echo 'Configuring...'
./configure --disable-optimise --disable-debug_info $wxCONFIGURE_FLAGS || rc=$?
wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS"
if [ "$wxUSE_ASAN" = 1 ]; then
export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan
wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
wxASAN_CXXFLAGS=$wxASAN_CFLAGS
wxASAN_LDFLAGS="-fsanitize=address"
./configure $wxCONFIGURE_OPTIONS --enable-debug "CFLAGS=$wxASAN_CFLAGS" "CXXFLAGS=$wxASAN_CXXFLAGS" "LDFLAGS=$wxASAN_LDFLAGS" || rc=$?
else
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
fi
if [ -n "$rc" ]; then
echo '*** Configuring failed, contents of config.log follows: ***'
echo '-----------------------------------------------------------'