Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

charris
Copy link
Member

@charris charris commented Jul 25, 2025

Backport of #29436.

#28769 introduced the usage of the clang fp exceptions(strict) pragma. However, this is broken when compiling for WebAssembly.

For that reason, the pragma is omitted when targeting Emscripten (by checking for __EMSCRIPTEN__). However, Clang can compile to WebAssembly without Emscripten. By also including a check for __wasm__, this patch allows NumPy to detect WebAssembly targets compiled without Emscripten.

This broadens NumPy's compatibility with WebAssembly toolchains and environments other than emscripten, such as WASIX.

This PR is a follow-up to #29053, which also added __wasm__ to a check that was previously Emscripten-only. When compiling for WASIX, we didn't encounter this issue previously, as we were targeting an older NumPy version.

@charris charris added this to the 2.3.3 release milestone Jul 25, 2025
@charris charris added 08 - Backport Used to tag backport PRs 36 - Build Build related PR labels Jul 25, 2025
@charris charris merged commit 8ba2d76 into numpy:maintenance/2.3.x Jul 25, 2025
75 checks passed
@charris charris deleted the backport-29436 branch July 25, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants