travis: only enable asan workaround for clang (breaks gcc)

fixes #2437
This commit is contained in:
Michael Stapelberg 2016-09-05 08:55:26 +02:00
parent 6584f70d28
commit 086276b329
1 changed files with 6 additions and 3 deletions

View File

@ -7,6 +7,8 @@ cd testcases
# TODO: remove this workaround once https://bugs.debian.org/836723 is fixed # TODO: remove this workaround once https://bugs.debian.org/836723 is fixed
# Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8: # Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8:
if [ "$CC" = "clang" ]
then
cat >fixasan.c <<EOT cat >fixasan.c <<EOT
void __isoc99_printf() {} void __isoc99_printf() {}
void __isoc99_sprintf() {} void __isoc99_sprintf() {}
@ -20,6 +22,7 @@ void __cxa_throw() {} // NEW
EOT EOT
gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib
export LD_PRELOAD=$PWD/fixasan.so export LD_PRELOAD=$PWD/fixasan.so
fi
# Try running the tests in parallel so that the common case (tests pass) is # Try running the tests in parallel so that the common case (tests pass) is
# quick, but fall back to running them in sequence to make debugging easier. # quick, but fall back to running them in sequence to make debugging easier.