]> granicus.if.org Git - clang/commitdiff
Set TLSSupported to false on Haiku.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 8 Nov 2012 12:59:15 +0000 (12:59 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 8 Nov 2012 12:59:15 +0000 (12:59 +0000)
Haiku does not support this (yet). Leaving it set to true leads to
configure scripts detecting __thread being available and Clang emitting
code for it, resulting in binaries the runtime_loader will refuse to
load.

Patch by Jonathan Schleifer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167576 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Sema/tls.c

index e52013ef0f30466a082222aad21719b432e790c2..ed3bd0be49b7ce215d263c55f3f08c06e7bd1369 100644 (file)
@@ -2745,6 +2745,7 @@ public:
     IntPtrType = SignedLong;
     PtrDiffType = SignedLong;
     this->UserLabelPrefix = "";
+    this->TLSSupported = false;
   }
   virtual void getTargetDefines(const LangOptions &Opts,
                                 MacroBuilder &Builder) const {
index 3b2a441bfea821dd7af2c045f4c5ec0df03dead3..4e5cfef0a3f3804e11068b062e122759c9dea804 100644 (file)
@@ -17,4 +17,7 @@
 // RUN: not %clang_cc1 -triple x86_64-pc-openbsd -fsyntax-only %s
 // RUN: not %clang_cc1 -triple i386-pc-openbsd -fsyntax-only %s
 
+// Haiku does not suppport TLS.
+// RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s
+
 __thread int x;