Fix icx profile-build

fixes the issue pointed out in https://github.com/official-stockfish/Stockfish/pull/6202

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

No functional change
This commit is contained in:
Joost VandeVondele
2025-08-04 14:53:49 +02:00
parent a37b38bdf0
commit a6e34f128f
+5 -1
View File
@@ -590,6 +590,10 @@ endif
# Locate the version in the same directory as the compiler used, # Locate the version in the same directory as the compiler used,
# with fallback to a generic one if it can't be located # with fallback to a generic one if it can't be located
LLVM_PROFDATA := $(dir $(realpath $(shell which $(CXX) 2> /dev/null)))llvm-profdata LLVM_PROFDATA := $(dir $(realpath $(shell which $(CXX) 2> /dev/null)))llvm-profdata
# for icx
ifeq ($(wildcard $(LLVM_PROFDATA)),)
LLVM_PROFDATA := $(dir $(realpath $(shell which $(CXX) 2> /dev/null)))/compiler/llvm-profdata
endif
ifeq ($(wildcard $(LLVM_PROFDATA)),) ifeq ($(wildcard $(LLVM_PROFDATA)),)
LLVM_PROFDATA := llvm-profdata LLVM_PROFDATA := llvm-profdata
endif endif
@@ -1137,7 +1141,7 @@ icx-profile-make:
all all
icx-profile-use: icx-profile-use:
$(XCRUN) llvm-profdata merge -output=stockfish.profdata *.profraw $(XCRUN) $(LLVM_PROFDATA) merge -output=stockfish.profdata *.profraw
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata' \ EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata' \
EXTRALDFLAGS='-fprofile-use ' \ EXTRALDFLAGS='-fprofile-use ' \