From a6e34f128f185d9772e6b3ecc7fdbff448444718 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Sat, 2 Aug 2025 13:59:01 +0200 Subject: [PATCH] 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 --- src/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 40dceae0b..047a9e71c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -590,6 +590,10 @@ endif # Locate the version in the same directory as the compiler used, # with fallback to a generic one if it can't be located 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)),) LLVM_PROFDATA := llvm-profdata endif @@ -1137,7 +1141,7 @@ icx-profile-make: all icx-profile-use: - $(XCRUN) llvm-profdata merge -output=stockfish.profdata *.profraw + $(XCRUN) $(LLVM_PROFDATA) merge -output=stockfish.profdata *.profraw $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \ EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata' \ EXTRALDFLAGS='-fprofile-use ' \