fairy-stockfish / Fairy-Stockfish

chess variant engine supporting Xiangqi, Shogi, Janggi, Makruk, S-Chess, Crazyhouse, Bughouse, and many more
https://fairy-stockfish.github.io/
GNU General Public License v3.0
612 stars 191 forks source link

-fexperimental-new-pass-manager is no longer valid for clang 16 #756

Closed xiota closed 8 months ago

xiota commented 8 months ago

-fexperimental-new-pass-manager was ignored in clang 15 and removed in clang 16.

https://github.com/fairy-stockfish/Fairy-Stockfish/blob/6c8fb4630cc3a3771b6f7e7fa723464c1795a037/src/Makefile#L541-L543

Upstream stockfish solution is to check clang version in Makefile#L619-L624:

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

Thanks. I cherry-picked the commit https://github.com/fairy-stockfish/Fairy-Stockfish/commit/052dce6a150c5dfc4a4775fc23319028904a86ab from upstream, should hopefully do the trick.