Skip to content

GH-50527: [C++] Remove ARROW_SSE4_2_FLAG for x86 MSVC#50526

Draft
loctormor wants to merge 1 commit into
apache:mainfrom
loctormor:patch-1
Draft

GH-50527: [C++] Remove ARROW_SSE4_2_FLAG for x86 MSVC#50526
loctormor wants to merge 1 commit into
apache:mainfrom
loctormor:patch-1

Conversation

@loctormor

@loctormor loctormor commented Jul 16, 2026

Copy link
Copy Markdown

The SSE4.2 flag is invalid for the MSVC x86 compiler.
https://learn.microsoft.com/en-us/cpp/build/reference/arch-x86

Rationale for this change

MSVC x86 builds generate hundreds of nuisance warnings that resemble:
cl : Command line warning D9002 : ignoring unknown option '/arch:SSE4.2'
This change aligns the flag with Microsoft documentation to remove the warnings.

What changes are included in this PR?

Simple replacement of the MSVC-specific flag "/arch:SSE4.2" with an empty string. This matches a working configuration prior to ~July 2025, at which time the flag seems to have been erroneously edited while adding xsimd definitions below.

Are these changes tested?

Yes - using cmake version 3.29.6 and a VC18 compiler.

Are there any user-facing changes?

No. This only affects developers building the source code and has no impact on the Apache Arrow libraries.

@github-actions

Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@github-actions
github-actions Bot marked this pull request as draft July 16, 2026 21:34
@loctormor loctormor changed the title Remove ARROW_SSE4_2_FLAG for x86 MSVC GH-50527: [C++] Remove ARROW_SSE4_2_FLAG for x86 MSVC Jul 16, 2026
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50527 has been automatically assigned in GitHub to PR creator.

# x86/amd64 compiler flags, msvc/gcc/clang
if(MSVC)
set(ARROW_SSE4_2_FLAG "/arch:SSE4.2")
set(ARROW_SSE4_2_FLAG "")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this only for x86 environment?
This disables SSE 4.2 on x64 environment too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants