[scudo] Check if we use __clang_major__ >= 12 am: 068afb4872

Original change: https://android-review.googlesource.com/c/platform/external/scudo/+/1763657

Change-Id: Ic6235aae342d5cfa8b8246ae2964644f106e8969
diff --git a/standalone/memtag.h b/standalone/memtag.h
index 0c47f67..cd8d95a 100644
--- a/standalone/memtag.h
+++ b/standalone/memtag.h
@@ -18,7 +18,7 @@
 
 namespace scudo {
 
-#if defined(__aarch64__) || defined(SCUDO_FUZZ)
+#if (__clang_major__ >= 12 && defined(__aarch64__)) || defined(SCUDO_FUZZ)
 
 // We assume that Top-Byte Ignore is enabled if the architecture supports memory
 // tagging. Not all operating systems enable TBI, so we only claim architectural
@@ -55,7 +55,7 @@
 
 #endif
 
-#if defined(__aarch64__)
+#if __clang_major__ >= 12 && defined(__aarch64__)
 
 #if SCUDO_LINUX