Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2861,10 +2861,19 @@ function(build_simdjson)

target_compile_definitions(simdjson PUBLIC SIMDJSON_EXCEPTIONS=0)

# The macOS 11.3 SDK has incomplete C++20 concepts support, which prevents
# simdjson headers from compiling. Disable simdjson concepts for this SDK.
if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES "MacOSX11\\.3\\.sdk$")
message(STATUS "Disabling simdjson concepts for macOS SDK 11.3")
# macOS SDKs before 13.3 ship a libc++ without <ranges> and with incomplete
# <concepts>, but simdjson enables its C++20 concepts API from the compiler's
# __cpp_concepts alone, so its headers fail to compile against those SDKs
# (GH-55267). Disable simdjson concepts for them. Arrow doesn't use that part
# of the simdjson API. simdjson considers these SDKs unsupported and won't fix
# this upstream, see https://github.com/simdjson/simdjson/issues/2787.
#
# The SDK directory name may omit the minor version ("MacOSX11.sdk" on CRAN,
# "MacOSX11.3.sdk" in our as-cran CI job), so match both forms. This treats
# "MacOSX13.sdk" as too old, which is harmless.
if(CMAKE_OSX_SYSROOT AND CMAKE_OSX_SYSROOT MATCHES
"MacOSX(1[0-2](\\.[0-9]+)?|13(\\.[0-2])?)\\.sdk$")
message(STATUS "Disabling simdjson concepts for macOS SDK older than 13.3")
target_compile_definitions(simdjson PUBLIC SIMDJSON_CONCEPT_DISABLED=1)
endif()

Expand Down
Loading