travis: only enable asan workaround for clang (breaks gcc)
fixes #2437
Michael Stapelberg
7 years ago
6 | 6 | |
7 | 7 | # TODO: remove this workaround once https://bugs.debian.org/836723 is fixed |
8 | 8 | # Found at https://llvm.org/bugs/show_bug.cgi?id=27310#c8: |
9 | cat >fixasan.c <<EOT | |
9 | if [ "$CC" = "clang" ] | |
10 | then | |
11 | cat >fixasan.c <<EOT | |
10 | 12 | void __isoc99_printf() {} |
11 | 13 | void __isoc99_sprintf() {} |
12 | 14 | void __isoc99_snprintf() {} |
17 | 19 | void __isoc99_vfprintf() {} |
18 | 20 | void __cxa_throw() {} // NEW |
19 | 21 | EOT |
20 | gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib | |
21 | export LD_PRELOAD=$PWD/fixasan.so | |
22 | gcc fixasan.c -o fixasan.so -fPIC -shared -nostdlib | |
23 | export LD_PRELOAD=$PWD/fixasan.so | |
24 | fi | |
22 | 25 | |
23 | 26 | # Try running the tests in parallel so that the common case (tests pass) is |
24 | 27 | # quick, but fall back to running them in sequence to make debugging easier. |