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

Owen Anderson resistor at mac.com
Mon May 18 16:29:07 PDT 2009


 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.

>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.  :-)

--Owen



More information about the llvm-commits mailing list