Repository navigation
Conversation
simdjson >= 5 uses GCC builtins such as __builtin_ctz when __SSE2__ is defined. So we can't build Apache Arrow C++ with simdjson >= 5 and MSVC because we define __SSE2__ globally. We don't need to define __SSE2__ because xsimd detects SSE2 by _M_X64 with MSVC. We still need to define __SSE4_1__/__SSE4_2__ for xsimd because MSVC doesn't define them even with /arch:SSE4.2. But we define them only where SSE4.2 is enabled. So they are no longer defined with ARROW_SIMD_LEVEL=NONE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@github-actions crossbow submit verify-rc-source-windows |
|
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Flag consumers support the updated list, xsimd feature detection remains intact, and no blocking issues were identified.
0 open findings
What changed in this PR
Fixes the MSVC build failure with simdjson 5+ by removing conflicting global SIMD definitions while preserving xsimd support.
Changes:
- Removes the global
__SSE2__definition. - Scopes SSE4.x definitions to SSE4.2-enabled compilation.
- Joins the expanded flag list when constructing common compiler flags.
| File | Description |
|---|---|
| cpp/cmake_modules/SetupCxxFlags.cmake | Scopes MSVC SIMD definitions and updates compiler flag assembly. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Revision: 342b329 Submitted crossbow builds: ursacomputing/crossbow @ actions-574d24d44c
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
simdjson >= 5uses GCC builtins such as__builtin_ctzwhen__SSE2__is defined. So we can't build Apache Arrow C++ withsimdjson >= 5and MSVC because we define__SSE2__globally.What changes are included in this PR?
We don't need to define
__SSE2__because xsimd detects SSE2 by_M_X64with MSVC.We still need to define
__SSE4_1__/__SSE4_2__for xsimd because MSVC doesn't define them even with/arch:SSE4.2. But we define them only where SSE4.2 is enabled. So they are no longer defined withARROW_SIMD_LEVEL=NONE.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: