-
Notifications
You must be signed in to change notification settings - Fork 190
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
Error building libcxx with recent LLVM due to -mthread-model posix default #173
Comments
Hmm, that patch is nearly two years old. Is there a more recent change that caused this to stop working? Who would have to add Looking at that old patch description, I wrote:
Clearly if it has some effect on libcxx, the thread model is not being ignored, so I suspect that you're right that changing the default to |
Ah, it looks like If I understand all the pieces here, "c++/v1/__config" is a header that gets included in end-user compiles, so as it currently stands every user would have to pass |
I wonder if |
Also, it looks like the #error in question was already removed from libc++ in https://reviews.llvm.org/D92349 to solve this very issue. |
Ooh, so I may have just gotten unlucky with the revision of LLVM I was using here. Rebuilding with a newer revision now... |
Still, it seems wrong that |
Looks good; my build with a newer LLVM revision succeeded. |
Ok, I won't bother looking into anything here right now then. |
So I think we can close this issue now. |
* Rewrite the preopen functionality. Rewrite the preopen functionality to be simpler, better organized, and better integrated into WASI libc. Preopen support has diverged so much from libpreopen that it no longer makes sense to track libpreopen as an explicit upstream. And add more documentation. * Fix missing #include. * Fix a compilation error.
see WebAssembly/wasi-sdk#173 for more details
see WebAssembly/wasi-sdk#173 for more details
This appears to be related to how https://reviews.llvm.org/D58742 changed the configuration of clang to use -mthread-model posix by default, which now leads clang to predefine
__STDCPP_THREADS__
. That is then incompatible with our configuring libcxx with_LIBCPP_HAS_NO_THREADS
, since libcxx doesn't like those two both being defined at the same time. But_LIBCPP_HAS_NO_THREADS
is necessary here to avoid libcxx using features not supported by all relevant engines—atomics.@tlively This now seems to be a case where defaulting to
-mthread-model single
would actually have the behavior we want here, and there aren't any other obvious options.How difficult would it be to switch the clang wasm32 target back to -mthread-model single by default?
Alternatively, should we use custom target checks in libcxx to tell it that it's ok to disable threads support even if
__STDCPP_THREADS__
is defined? Or, should we add custom checks to clang to avoid definint__STDCPP_THREADS__
?The text was updated successfully, but these errors were encountered: