-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix for -pthread
+ -sRELOCATABLE
#22110
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
Conversation
Why doesn't this function actually need to work? |
// RELOCATABLE is used without MAIN_MODULE. This is because the call | ||
// site in pthread_create.c is not able to distinguish between these | ||
// two cases. | ||
_emscripten_thread_exit_joinable: (thread) => {}, |
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.
Perhaps this should error if actually called? I assume it would be invalid to do so?
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.
No it can be called on pthread exit.. in any PIC build. The prolbem is that we only have one single PIC flavor of libc and so we can't distinguish between -sRELOCATABLE
and -sMAIN_MODULE
in the native code.
The function is only used to keep track of shared library loading (i.e. when The problem is that the native code that calls this function cannot distinguish between |
See emscripten/system/lib/pthread/pthread_create.c Lines 343 to 346 in 131cb71
|
I would really love to completely get rid of the "RELOCATABLE but not MAIN_MODULE" build mode one day.. because I don't think it has any/many valid uses. |
Fixes: #22108