[PATCH] D40326: Fix static link on debian
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 09:59:30 PST 2017
Chris Bieneman via Phabricator <reviews at reviews.llvm.org> writes:
> beanz added a comment.
>
> I don't see anything wrong with this patch as a workaround, but it seems like there might be a bigger issue here.
>
> Is there a reason why std::thread is implemented with weak references to pthread? Is this libstdc++'s implementation or libcxx? Should we consider changes to the clang driver as well?
This is libstdc++. We would need the cmake change even if we changed
clang for when building with gcc.
> It's undesirable for user code that is using std::thread to require the user to list pthread as a dependency, and even worse if the pthread library needs to be linked with extra flags.
I have no idea why it is done this way. It seems broken to say a
reference is weak and then crash if the target is not loaded.
Cheers,
Rafael
More information about the llvm-commits
mailing list