]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
Use llvm linker with clang on windows for LTO.
[stockfish] / src / Makefile
index 9ae5a51c5df85ca86b278fb69769748674644248..340b3008381be752d1d9edf1cd3020bffd323961 100644 (file)
@@ -595,6 +595,11 @@ ifeq ($(debug), no)
                LDFLAGS += $(CXXFLAGS)
        else ifeq ($(comp),clang)
                CXXFLAGS += -flto=thin
+               ifneq ($(findstring MINGW,$(KERNEL)),)
+                       CXXFLAGS += -fuse-ld=lld
+               else ifneq ($(findstring MSYS,$(KERNEL)),)
+                       CXXFLAGS += -fuse-ld=lld
+               endif
                LDFLAGS += $(CXXFLAGS)
 
 # GCC and CLANG use different methods for parallelizing LTO and CLANG pretends to be