<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff --git a/tools/clang/lib/Basic/Targets/OSTargets.h b/tools/clang/lib/Basic/Targets/OSTargets.h
index d0354784..102605fe 100644
--- a/tools/clang/lib/Basic/Targets/OSTargets.h
+++ b/tools/clang/lib/Basic/Targets/OSTargets.h
@@ -93,7 +93,7 @@ public:
     this-&gt;TLSSupported = false;
 
     if (Triple.isMacOSX())
-      this-&gt;TLSSupported = !Triple.isMacOSXVersionLT(10, 7);
+      this-&gt;TLSSupported = !Triple.isMacOSXVersionLT(10, 4);
     else if (Triple.isiOS()) {
       // 64-bit iOS supported it from 8 onwards, 32-bit device from 9 onwards,
       // 32-bit simulator from 10 onwards.
diff --git a/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp b/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
index 00fff144..052924ab 100644
--- a/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -2255,7 +2255,7 @@ static void emitGlobalDtorWithCXAAtExit(CodeGenFunction &amp;CGF,
   const char *Name = "__cxa_atexit";
   if (TLS) {
     const llvm::Triple &amp;T = CGF.getTarget().getTriple();
-    Name = T.isOSDarwin() ?  "_tlv_atexit" : "__cxa_thread_atexit";
+    Name = (T.isOSDarwin() &amp;&amp; !T.isMacOSXVersionLT(10, 7)) ?  "_tlv_atexit" : "__cxa_thread_atexit";
   }
 
   // We're assuming that the destructor function is something we can
</pre></body></html>