Fix ASAN with new debian toolchain.
Even building standalone hello world complains "ASan runtime does not come first in initial library list" and says to use LD_PRELOAD without saying WHAT to set it to. This avoids that. (It breaks llvm, but https://github.com/llvm/llvm-project/pull/98194 fixes it.)
This commit is contained in:
parent
dbd267f4b7
commit
9115abfe45
@ -32,7 +32,7 @@ fi
|
||||
if [ -n "$ASAN" ]; then
|
||||
# Turn ASan on and disable most optimization to get more readable backtraces.
|
||||
# (Technically ASAN is just "-fsanitize=address" and the rest is optional.)
|
||||
export CFLAGS="$CFLAGS -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls"
|
||||
export CFLAGS="$CFLAGS -fsanitize=address -O1 -g -fno-omit-frame-pointer -fno-optimize-sibling-calls -static-libasan"
|
||||
export NOSTRIP=1
|
||||
# Ignore leaks on exit. TODO
|
||||
export ASAN_OPTIONS="detect_leaks=0"
|
||||
|
Loading…
Reference in New Issue
Block a user