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

index db81027d16c073a55538512f52581fb343277a5a..1c579d2dcc4d72ff8f6708aaeff4800da6d06282 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])