Skip to content

Commit

Permalink
Fix Makefile for clang 16
Browse files Browse the repository at this point in the history
The clang 16 release will remove the -fexperimental-new-pass-manager
flag (see llvm/llvm-project@69b2b72).
Thus, the commit adapts the Makefile to use this flag only for older
clang versions.

closes official-stockfish/Stockfish#4437

No functional change
  • Loading branch information
UniQP authored and ianfab committed Feb 10, 2024
1 parent 6c8fb46 commit 052dce6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,10 @@ ifeq ($(optimize),yes)
endif

ifeq ($(comp),clang)
CXXFLAGS += -fexperimental-new-pass-manager
clangmajorversion = $(shell $(CXX) -dumpversion 2>/dev/null | cut -f1 -d.)
ifeq ($(shell expr $(clangmajorversion) \< 16),1)
CXXFLAGS += -fexperimental-new-pass-manager
endif
endif
endif

Expand Down

0 comments on commit 052dce6

Please sign in to comment.