]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
configure: add sanitizer flags to LDFLAGS as well 3959/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 1 Sep 2021 07:46:58 +0000 (09:46 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 1 Sep 2021 07:46:58 +0000 (09:46 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac

index 0e4cbf92d9690d05a3b98f5ab29e8bcde0ae1ca0..95da6bef71f708bbc03829978931cb263187fd47 100644 (file)
@@ -479,6 +479,11 @@ if test "x$enable_sanitizers" = "xyes"; then
                -fno-omit-frame-pointer])
        AC_SUBST(AM_CFLAGS)
 
+       CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \
+               -fsanitize=address \
+               -fsanitize=undefined])
+       AC_SUBST(AM_LDFLAGS)
+
        AC_MSG_RESULT([yes])
 else
        AC_MSG_RESULT([no])