Skip to content

BLD: allow targeting webassembly without emscripten #29436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025
Merged

Conversation

zebreus
Copy link
Contributor

@zebreus zebreus commented Jul 24, 2025

#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.

@github-actions github-actions bot added the 36 - Build Build related PR label Jul 24, 2025
@rgommers rgommers added the 09 - Backport-Candidate PRs tagged should be backported label Jul 25, 2025
@rgommers rgommers added this to the 2.4.0 release milestone Jul 25, 2025
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @zebreus

@rgommers rgommers merged commit 91d3f21 into numpy:main Jul 25, 2025
77 checks passed
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy