Skip to content

BLD: fallback to __builtin_prefetch on clang-cl with -mno-mmx#2742

Merged
copybara-service[bot] merged 1 commit into
google:masterfrom
seiko2plus:fix-x86-clangcl-prefetch
Oct 1, 2025
Merged

BLD: fallback to __builtin_prefetch on clang-cl with -mno-mmx#2742
copybara-service[bot] merged 1 commit into
google:masterfrom
seiko2plus:fix-x86-clangcl-prefetch

Conversation

@seiko2plus
Copy link
Copy Markdown
Contributor

@seiko2plus seiko2plus commented Oct 1, 2025

clang-cl requires MMX for _mm_prefetch. With -mno-mmx, __MMX__ is undefined and the build fails in cache_control.h. Use __builtin_prefetch in this configuration; keep _mm_prefetch everywhere else. Fixes NumPy's CI failure on Windows without MMX.

For further details, see #2737 (comment)

`clang-cl` requires `MMX` for ``_mm_prefetch`. With `-mno-mmx`, `__MMX__` is
undefined and the build fails in cache_control.h. Use
`__builtin_prefetch` in this configuration; keep `_mm_prefetch`
everywhere else. Fixes NumPy's CI failure on Windows without MMX.
@copybara-service copybara-service Bot merged commit 1d10255 into google:master Oct 1, 2025
35 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants