-
-
Notifications
You must be signed in to change notification settings - Fork 745
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
ICU-22838 Add WebAssembly/WASI cross-compilation support #3067
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -313,6 +313,20 @@ | |
# define U_PLATFORM_IS_DARWIN_BASED 0 | ||
#endif | ||
|
||
/** | ||
* \def U_HAVE_ATOMICS | ||
* Defines whether the platform supports atomic operations. | ||
* @internal | ||
Comment on lines
+317
to
+319
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: maybe name it |
||
*/ | ||
#ifdef U_HAVE_ATOMICS | ||
/* Use the predefined value. */ | ||
#elif defined(__wasi__) && !defined(_REENTRANT) | ||
/* WASI does not support atomics when wasi-threads feature is not enabled */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: why not use wasi-threads, then? It seems error-prone to add a flag that skips mutexes. |
||
# define U_HAVE_ATOMICS 0 | ||
#else | ||
# define U_HAVE_ATOMICS 1 | ||
#endif | ||
|
||
/*===========================================================================*/ | ||
/** @{ Compiler and environment features */ | ||
/*===========================================================================*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: please build this in GitHub Actions, because otherwise it could break again at any time.