]> git.sesse.net Git - stockfish/commitdiff
Apply -flto-partition=one / -flto=full
authorMinetaS <skdty87@gmail.com>
Sun, 16 Oct 2022 15:03:08 +0000 (00:03 +0900)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 23 Oct 2022 17:58:47 +0000 (19:58 +0200)
This patch fixes a potential bug derived from an incompatibility between LTO and top-level assembly code (INCBIN).

Passed non-regression STC (master e90341f):
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 119352 W: 31986 L: 31862 D: 55504
Ptnml(0-2): 439, 12624, 33400, 12800, 413
https://tests.stockfishchess.org/tests/view/634aacf84bc7650f0755188b

closes https://github.com/official-stockfish/Stockfish/pull/4201

No functional change

AUTHORS
src/Makefile

diff --git a/AUTHORS b/AUTHORS
index 804232f17727b441969487f4076912e145593ca4..89e7c9edcb925807f87aebf28ab2627614c06756 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -189,6 +189,7 @@ Stefan Geschwentner (locutus2)
 Stefano Cardanobile (Stefano80)
 Steinar Gunderson (sesse)
 Stéphane Nicolet (snicolet)
+Syine Mineta (MinetaS)
 Prokop Randáček (ProkopRandacek)
 Thanar2
 thaspel
index 880710fe8a7688f6f1e65afa3f4d8232ea076ad1..1d5137d1c507c164315cfc0100bf6f3dd7fb2fbf 100644 (file)
@@ -678,7 +678,7 @@ endif
 ifeq ($(optimize),yes)
 ifeq ($(debug), no)
        ifeq ($(comp),clang)
-               CXXFLAGS += -flto
+               CXXFLAGS += -flto=full
                ifeq ($(target_windows),yes)
                        CXXFLAGS += -fuse-ld=lld
                endif
@@ -688,10 +688,10 @@ ifeq ($(debug), no)
 # GCC on some systems.
        else ifeq ($(comp),gcc)
        ifeq ($(gccisclang),)
-               CXXFLAGS += -flto
+               CXXFLAGS += -flto -flto-partition=one
                LDFLAGS += $(CXXFLAGS) -flto=jobserver
        else
-               CXXFLAGS += -flto
+               CXXFLAGS += -flto=full
                LDFLAGS += $(CXXFLAGS)
        endif