From 194571f4791a965c5ca760e802d75d89ad999f8f Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 21 Sep 2023 20:42:33 +0000 Subject: [PATCH] Bug 1854305 - Don't enable thread safety annotations before clang 11. r=nika Arbitrary capability names weren't allowed until clang 11, and while we could probably make things somehow work with earlier versions of clang, it's not that interesting, as long as we keep the thread safety analysis running with newer versions of clang on our CI (which we obviously do). Differential Revision: https://phabricator.services.mozilla.com/D188791 --- mfbt/ThreadSafety.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mfbt/ThreadSafety.h b/mfbt/ThreadSafety.h index f1382643e1a9..9b18c71bd039 100644 --- a/mfbt/ThreadSafety.h +++ b/mfbt/ThreadSafety.h @@ -22,7 +22,7 @@ #define mozilla_ThreadSafety_h #include "mozilla/Attributes.h" -#if defined(__clang__) && (__clang_major__ >= 8) && !defined(SWIG) +#if defined(__clang__) && (__clang_major__ >= 11) && !defined(SWIG) # define MOZ_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) // Allow for localized suppression of thread-safety warnings; finer-grained // than MOZ_NO_THREAD_SAFETY_ANALYSIS