[llvm-commits] [PATCH] Detect GCC atomic builtins in configure

Eric Christopher echristo at apple.com
Mon May 18 16:35:33 PDT 2009


On May 18, 2009, at 4:29 PM, Owen Anderson wrote:


> On Monday, May 18, 2009, at 06:06PM, "Eric Christopher" <echristo at apple.com 
> > wrote:
>
>> Quite a better, couple of questions/comments:
>>
>>
>>
>> a)  If you're doing this then why the configure flag? Shouldn't
>>
>> something just fail to link ultimately if this is wrong?
>>
>
> LLVM can be built in threads-disabled mode, which turns mutexes into  
> no-ops, etc.
> The sensible policy seems (to me) to be to try to honor the user's  
> request for
> thread-safety if possible.  If not, we print a warning and continue  
> to build
> in thread-unsafe mode.
>
> Thinking about it a bit more, maybe we should make it a hard error  
> if the
> user explicitly asked for thread-safety on an unsupported target, and
> a warning if it's just thread-safety-as-default.
>

Don't know how you'd guess target though since llvm is multi-arch at  
build time.

Honestly I think you get what you ask for it might be much more simple  
to
just mark which targets work and then have a preprocessor flag that sees
if it's set and the native platform.

*shrug* :)

>
>> b) I'm pretty sure that you don't need the [] around the values - at
>>
>> least not for AC_SUBST and AC_DEFINE.
>>
>
> I have no idea.  I just copied and pasted from elsewhere.  :-)
>

Aaah. I don't believe you need it.

-eric




More information about the llvm-commits mailing list