[PATCH] [libc++] Allow libc++ to be built on systems without POSIX threads
Jonathan Roelofs
jonathan at codesourcery.com
Fri Aug 29 11:51:06 PDT 2014
On 8/29/14, 11:39 AM, Dan Albert wrote:
> From email thread:
>
>>> Should we have a buildbot set up to build this configuration?
>> I would appreciate having one, but I can't host it at the moment.
>> At some point I would like to host a baremetal buildbot (targeting either QEMU, a raspberry pi, or some beagleboard), but I'm not quite ready for that... we need to work out the details of remote testing in lit before that is practical.
>
> Keeping a buildbot going for this patch doesn't actually require baremetal (though that would be nice to have as well). @EricWF recently set up a buildbot. He might be willing to host it.
>
>>> Would it be possible to define noop implementations of all the things you've ifdef'd out so that we don't have to worry about that? It's possible that would make things more or a mess, but I'm not sure.
>> I think that nop-shims have an even higher potential for bit-rot than these #ifdef's.
>> I originally attempted writing no-op shims for a few of them, but there were several where it didn't seem possible, and others where the shims were pretty hairy.
>
> Okay, I thought that might be the case.
>
> With those things accounted for, LGTM.
There's one last detail which I'm not sure how to address (from one of my
comments earlier in the review):
"Another thing I've just realized: if this is only set during the build, then
how to I arrange for it to be set in an installed system? I don't want my users
to have to -D_LIBCPP_HAS_NO_THREADS whenever they want to use libcxx."
What's the right way to have that set in the config when we want it turned on?
In my local tree I've got it hardcoded, but obviously that isn't going to work
in the upstream sources.
A different solution to this would be to have http://reviews.llvm.org/D4985 set
some #define saying that we're building something for a single threaded
environment. I'm not sure what that would look like exactly, and haven't seen
anything like it out of GCC.
Thoughts?
Jon
>
> http://reviews.llvm.org/D3969
>
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the cfe-commits
mailing list