I’ve been trying to upgrade my project to 0.16.0. A problem I ran into is that wasi libc now includes a bunch of non-functional stub functions (in lib/libc/wasi/thread-stub). These conflict with the pthread emulation functions (based on std) that I’ve written. Is there a flag or something that would keep pthread from getting link into libc?
My current workaround involves sticking a bunch of pragmas into libc/wasi/libc-top-half/musl/src/internal/pthread_impl.h:
#pragma weak pthread_attr_destroy
#pragma weak pthread_attr_getdetachstate
#pragma weak pthread_attr_getguardsize
#pragma weak pthread_attr_getinheritsched
#pragma weak pthread_attr_getschedparam
#pragma weak pthread_attr_getschedpolicy
#pragma weak pthread_attr_getscope
#pragma weak pthread_attr_getstack
#pragma weak pthread_attr_getstackaddr
/* ... */
I wonder if I should submit that in a PR. It sort of makes sense for functions that don’t work to have weak linkage, right?