From 5b85fac9b0edf82b261007471f4b2e46072c4c6d Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 29 Oct 2024 09:07:07 -0700 Subject: [PATCH] Use -fsanitize=address instead of -lasan for ASAN linker flags This allows the compiler to use some other linkages instead of -lasan in case that's not the correct one for the platform. It (should) also make sure that the ASAN library is the first library that gets linked and loaded at runtime. Signed-off-by: Saikrishna Arcot --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 231f1e1c58..6edc02da91 100644 --- a/configure.ac +++ b/configure.ac @@ -136,7 +136,7 @@ if test "x$asan_enabled" = "xtrue"; then CFLAGS_ASAN+=" -Wno-maybe-uninitialized" AC_SUBST(CFLAGS_ASAN) - LDFLAGS_ASAN+=" -lasan" + LDFLAGS_ASAN+=" -fsanitize=address" AC_SUBST(LDFLAGS_ASAN) fi