Allow using Intel SDE for PGO builds.
authorTomasz Sobczyk <tomasz.sobczyk1997@gmail.com>
Sat, 27 Feb 2021 10:52:18 +0000 (11:52 +0100)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 27 Mar 2021 15:56:05 +0000 (16:56 +0100)
The software development emulator (SDE) allows to run binaries compiled
for architectures not supported by the actual CPU. This is useful to
do PGO builds for newer architectures. The SDE can currently be obtained from
https://software.intel.com/content/www/us/en/develop/articles/intel-software-development-emulator.html

This patch introduces a new optional makefile argument SDE_PATH.
If not empty it should contain the path to the sde executable

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

No functional change.

src/Makefile

index eb32758..cdd2007 100644 (file)
@@ -31,7 +31,11 @@ PREFIX = /usr/local
 BINDIR = $(PREFIX)/bin
 
 ### Built-in benchmark for pgo-builds
-PGOBENCH = ./$(EXE) bench
+ifeq ($(SDE_PATH),)
+       PGOBENCH = ./$(EXE) bench
+else
+       PGOBENCH = $(SDE_PATH) -- ./$(EXE) bench
+endif
 
 ### Source and object files
 SRCS = benchmark.cpp bitbase.cpp bitboard.cpp endgame.cpp evaluate.cpp main.cpp \