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:
committed by
Vadim Zeitlin
parent
fe7230e19c
commit
0310347dc4
@@ -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 '-----------------------------------------------------------'
|
||||
|
Reference in New Issue
Block a user