]> git.sesse.net Git - stockfish/blobdiff - src/Makefile
This commit enables a mixed bench, to improve CI and allow for PGO (profile-build...
[stockfish] / src / Makefile
index 3d84f4826547076ef241e5f07da09c231d63282b..c00b60b5a56abfc6737689a1e2c2604719853f5a 100644 (file)
@@ -416,7 +416,7 @@ endif
 ifeq ($(avx512),yes)
        CXXFLAGS += -DUSE_AVX512
        ifeq ($(comp),$(filter $(comp),gcc clang mingw))
-               CXXFLAGS += -mavx512bw
+               CXXFLAGS += -mavx512f -mavx512bw
        endif
 endif
 
@@ -472,6 +472,11 @@ ifeq ($(debug), no)
        ifeq ($(gccisclang),)
                CXXFLAGS += -flto
                LDFLAGS += $(CXXFLAGS) -flto=jobserver
+               ifneq ($(findstring MINGW,$(KERNEL)),)
+                       LDFLAGS += -save-temps
+               else ifneq ($(findstring MSYS,$(KERNEL)),)
+                       LDFLAGS += -save-temps
+               endif
        else
                CXXFLAGS += -flto=thin
                LDFLAGS += $(CXXFLAGS)
@@ -564,7 +569,7 @@ help:
 build: config-sanity
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) all
 
-profile-build: config-sanity objclean profileclean
+profile-build: config-sanity objclean profileclean net
        @echo ""
        @echo "Step 1/4. Building instrumented executable ..."
        $(MAKE) ARCH=$(ARCH) COMP=$(COMP) $(profile_make)
@@ -605,7 +610,7 @@ objclean:
 # clean auxiliary profiling files
 profileclean:
        @rm -rf profdir
-       @rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda
+       @rm -f bench.txt *.gcda *.gcno ./syzygy/*.gcda ./nnue/*.gcda ./nnue/features/*.gcda *.s
        @rm -f stockfish.profdata *.profraw
 
 default: