Skip to content
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

[Emscripten port] Fix core count logic for Emscripten+pthreads #6350

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

kripken
Copy link
Member

@kripken kripken commented Feb 26, 2024

Before this all Emscripten builds would use 1 core.

@kripken kripken requested review from sbc100 and tlively February 26, 2024 22:00
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

🎉

@kripken kripken merged commit 55c2062 into WebAssembly:main Feb 27, 2024
14 checks passed
@kripken kripken deleted the emcc.pthread branch February 27, 2024 01:13
#ifdef __EMSCRIPTEN__
#if defined(__EMSCRIPTEN__) && !defined(__EMSCRIPTEN_PTHREADS__)
// In an Emscripten build without pthreads support, avoid the overhead of
// including support code for the below runtime checks.
Copy link
Member

Choose a reason for hiding this comment

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

If you really to be sure to avoid the cost why not keep the else/endif? That way you are not relying so much on linker magic to do what you hope it will do.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, thanks, I opened #6355

radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
…sembly#6350)

Before this all Emscripten builds would use 1 core, but it is important to
allow pthreads builds there to use more.
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants