From b15e3b3fa9a4fb5da6e30685c0813a62cee5dd3f Mon Sep 17 00:00:00 2001 From: Gian-Carlo Pascutto Date: Tue, 9 Feb 2021 14:05:35 +0100 Subject: [PATCH] Disable ThinLTO when using Clang. Benchmarking with current Clang 12 shows that and ThinLTO is a pessimization, see issue #3341. closes https://github.com/official-stockfish/Stockfish/pull/3345 No functional change. --- src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 55139a1f..827ce6bb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -590,7 +590,7 @@ endif ifeq ($(optimize),yes) ifeq ($(debug), no) ifeq ($(comp),clang) - CXXFLAGS += -flto=thin + CXXFLAGS += -flto ifneq ($(findstring MINGW,$(KERNEL)),) CXXFLAGS += -fuse-ld=lld else ifneq ($(findstring MSYS,$(KERNEL)),) @@ -610,7 +610,7 @@ ifeq ($(debug), no) LDFLAGS += -save-temps endif else - CXXFLAGS += -flto=thin + CXXFLAGS += -flto LDFLAGS += $(CXXFLAGS) endif -- 2.39.2