From 919da35b0398af9a41b0213174e166f17f0b7a0c Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 20 Jan 2022 09:42:28 +0100 Subject: [PATCH] build: only enable LTO for regular builds Signed-off-by: Christian Brauner --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3e964b2b9..ac2950d08 100644 --- a/configure.ac +++ b/configure.ac @@ -500,7 +500,9 @@ if test "x$enable_fuzzers" = "xyes"; then CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[ \ -DRUN_ON_OSS_FUZZ=1]) fi -else +fi + +if test "x$enable_fuzzers" = "xno" -a "x$enable_sanitizers" = "xno"; then CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[-flto=thin]) fi AC_SUBST(AM_CFLAGS)