1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Use llvm linker with clang on windows for LTO.

other linkers might fail to link during the LTO phase.

The linker might have to be installed using
`pacman -Syu mingw-w64-x86_64-lld`

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

No functional change.
This commit is contained in:
mstembera 2020-08-30 20:48:10 -07:00 committed by Joost VandeVondele
parent a0afe32d16
commit a057f170c6

View 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