CMakeLists: Increase maximum bracket depth for Clang

See also: https://reviews.llvm.org/D86936
Bracket depth limits size of fold expression which in turn limits size of std::array initialization via CTAD
This commit is contained in:
MerryMage 2021-02-16 20:07:55 +00:00
parent fe761b2c61
commit b841ce1df5

View file

@ -97,6 +97,12 @@ else()
list(APPEND DYNARMIC_CXX_FLAGS
-Wfatal-errors)
endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
# Bracket depth determines maximum size of a fold expression in Clang since 9c9974c3ccb6.
# And this in turns limits the size of a std::array.
list(APPEND DYNARMIC_CXX_FLAGS -fbracket-depth=1024)
endif()
endif()
# Arch detection