binaries:
- x86-32
- x86-64
- - x86-64-modern
+ - x86-64-sse41-popcnt
- x86-64-avx2
- x86-64-bmi2
- x86-64-avxvnni
run: |
export CXXFLAGS="-O1 -fno-inline"
make clean
- make -j2 ARCH=x86-64-modern ${{ matrix.sanitizers.make_option }} debug=yes optimize=no build > /dev/null
+ make -j2 ARCH=x86-64-sse41-popcnt ${{ matrix.sanitizers.make_option }} debug=yes optimize=no build > /dev/null
../tests/instrumented.sh --${{ matrix.sanitizers.instrumented_option }}
# x86-64 tests
- - name: Test debug x86-64-modern build
+ - name: Test debug x86-64-sse41-popcnt build
if: matrix.config.run_64bit_tests
run: |
export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
make clean
- make -j2 ARCH=x86-64-modern optimize=no debug=yes build
+ make -j2 ARCH=x86-64-sse41-popcnt optimize=no debug=yes build
../tests/signature.sh $benchref
- name: Test x86-64-bmi2 build
make -j2 ARCH=x86-64-avx2 build
../tests/signature.sh $benchref
+ # Test a deprecated arch
- name: Test x86-64-modern build
if: matrix.config.run_64bit_tests
run: |
make -j2 ARCH=x86-64-modern build
../tests/signature.sh $benchref
+ - name: Test x86-64-sse41-popcnt build
+ if: matrix.config.run_64bit_tests
+ run: |
+ make clean
+ make -j2 ARCH=x86-64-sse41-popcnt build
+ ../tests/signature.sh $benchref
+
- name: Test x86-64-ssse3 build
if: matrix.config.run_64bit_tests
run: |
if: matrix.config.run_64bit_tests
run: |
make clean
- make -j2 ARCH=x86-64-modern build
+ make -j2 ARCH=x86-64-sse41-popcnt build
../tests/perft.sh
../tests/reprosearch.sh
On Unix-like systems, it should be easy to compile Stockfish directly from the
source code with the included Makefile in the folder `src`. In general, it is
recommended to run `make help` to see a list of make targets with corresponding
-descriptions.
+descriptions. An example suitable for most Intel and AMD chips:
```
cd src
-make -j build ARCH=x86-64-modern
+make -j profile-build ARCH=x86-64-avx2
```
Detailed compilation instructions for all platforms can be found in our
### 2.1. General and architecture defaults
ifeq ($(ARCH),)
- ARCH = x86-64-modern
+ ARCH = x86-64-avx2
help_skip_sanity = yes
endif
# explicitly check for the list of supported architectures (as listed with make help),
endif
ifeq ($(findstring -modern,$(ARCH)),-modern)
+ $(warning *** ARCH=$(ARCH) is deprecated, defaulting to ARCH=x86-64-sse41-popcnt. Execute `make help` for a list of available architectures. ***)
+ $(shell sleep 5)
popcnt = yes
sse = yes
sse2 = yes
@echo "x86-64-bmi2 > x86 64-bit with bmi2 support"
@echo "x86-64-avx2 > x86 64-bit with avx2 support"
@echo "x86-64-sse41-popcnt > x86 64-bit with sse41 and popcnt support"
- @echo "x86-64-modern > common modern CPU, currently x86-64-sse41-popcnt"
+ @echo "x86-64-modern > deprecated, currently x86-64-sse41-popcnt"
@echo "x86-64-ssse3 > x86 64-bit with ssse3 support"
@echo "x86-64-sse3-popcnt > x86 64-bit with sse3 and popcnt support"
@echo "x86-64 > x86 64-bit generic (with sse2 support)"
@echo "Simple examples. If you don't know what to do, you likely want to run one of: "
@echo ""
@echo "make -j profile-build ARCH=x86-64-avx2 # typically a fast compile for common systems "
- @echo "make -j profile-build ARCH=x86-64-modern # A more portable compile for 64-bit systems "
+ @echo "make -j profile-build ARCH=x86-64-sse41-popcnt # A more portable compile for 64-bit systems "
@echo "make -j profile-build ARCH=x86-64 # A portable compile for 64-bit systems "
@echo ""
@echo "Advanced examples, for experienced users: "
@echo ""
- @echo "make -j profile-build ARCH=x86-64-bmi2"
- @echo "make -j profile-build ARCH=x86-64-bmi2 COMP=gcc COMPCXX=g++-9.0"
+ @echo "make -j profile-build ARCH=x86-64-avxvnni"
+ @echo "make -j profile-build ARCH=x86-64-avxvnni COMP=gcc COMPCXX=g++-12.0"
@echo "make -j build ARCH=x86-64-ssse3 COMP=clang"
@echo ""
@echo "-------------------------------"