Statically link libasan during ASAN builds
Some deployments of GCC won't link ASAN build without explicitly specifying the library, and report: "ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD" This commit includes the asan library by default for respective builds.
This commit is contained in:
parent
85517f82a9
commit
9d576b5cb7
1 changed files with 2 additions and 0 deletions
|
@ -30,8 +30,10 @@ cflags_fdotrain+=("${cflags[@]}" -DNDEBUG -g1 -fno-omit-frame-pointer)
|
|||
cflags_optinfo+=("${cflags_release[@]}" -fopt-info-missed
|
||||
-ftree-vectorizer-verbose=6)
|
||||
cflags_asan+=("${cflags_debug[@]}" -fsanitize=address)
|
||||
ldflags_asan+=(-static-libasan)
|
||||
cflags_uasan+=("${cflags_debug[@]}" -fsanitize=address,undefined
|
||||
-fsanitize-recover=signed-integer-overflow)
|
||||
ldflags_uasan+=(-static-libasan)
|
||||
cflags_usan+=("${cflags_debug[@]}" -fsanitize=undefined
|
||||
-fsanitize-recover=signed-integer-overflow)
|
||||
cflags_tsan+=("${cflags_debug[@]}" -fsanitize=thread)
|
||||
|
|
Loading…
Add table
Reference in a new issue