[PATCH] D28520: Disable -Wthread-safety-analysis for some functions in __thread_support

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 12:13:23 PST 2017


dim updated this revision to Diff 85440.
dim added a comment.

In https://reviews.llvm.org/D28520#653360, @aaron.ballman wrote:

> In https://reviews.llvm.org/D28520#652607, @dim wrote:
>
> >
>


[...]

>> I'm really open to any variant, as long as something that works can get in before the 4.0.0 release. :)
> 
> I feel like there's still some confusion here (likely on my part). DeLesley was asking if there was a way to turn this off for everyone *except* FreeBSD (that is user-controllable), but your code turns it off specifically *for* FreeBSD with no option to enable. The part that has me confused is that FreeBSD is annotating their functionality specifically to enable thread safety checking; it seems like turning that checking off rather than supporting it is the wrong way to go. I think that may be why DeLesley was saying to disable the functionality for non-FreeBSD systems while still honoring it on FreeBSD, but if I'm confused, hopefully he'll clarify.

Ok, so let's go back to the previous variant, but with conditionals to be able to turn checking on, if so desired, using `_LIBCPP_ENABLE_THREAD_SAFETY_ATTRIBUTE`.  Checking is on by default for FreeBSD only, but can still be disabled explicitly by defining `_LIBCPP_DISABLE_THREAD_SAFETY_ATTRIBUTE`.


https://reviews.llvm.org/D28520

Files:
  include/__threading_support

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28520.85440.patch
Type: text/x-patch
Size: 4042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170123/44ae9b72/attachment.bin>


More information about the cfe-commits mailing list