Disable ThinLTO when using Clang.
authorGian-Carlo Pascutto <gcp@sjeng.org>
Tue, 9 Feb 2021 13:05:35 +0000 (14:05 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 10 Feb 2021 18:52:20 +0000 (19:52 +0100)
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

index 55139a1f75eb92dc34e8628721cadef8f73b9b27..827ce6bb9d838930708ab6542ce04b89c411e014 100644 (file)
@@ -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