Using -verify / no -verify to distinguish support / no support really confused me. Can we just use %clang_cc1 / not %clang_cc1?
On Aug 1, 2012, at 11:53 , Hans Wennborg <[email protected]> wrote: > Author: hans > Date: Wed Aug 1 13:53:19 2012 > New Revision: 161124 > > URL: http://llvm.org/viewvc/llvm-project?rev=161124&view=rev > Log: > TLS is not supported on OpenBSD > > This fixes PR13502 and adds a test to keep track of which > targets support TLS and which do not. > > Added: > cfe/trunk/test/Sema/tls.c > Modified: > cfe/trunk/lib/Basic/Targets.cpp > > Modified: cfe/trunk/lib/Basic/Targets.cpp > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=161124&r1=161123&r2=161124&view=diff > ============================================================================== > --- cfe/trunk/lib/Basic/Targets.cpp (original) > +++ cfe/trunk/lib/Basic/Targets.cpp Wed Aug 1 13:53:19 2012 > @@ -373,6 +373,7 @@ > OpenBSDTargetInfo(const std::string &triple) > : OSTargetInfo<Target>(triple) { > this->UserLabelPrefix = ""; > + this->TLSSupported = false; > > llvm::Triple Triple(triple); > switch (Triple.getArch()) { > > Added: cfe/trunk/test/Sema/tls.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/tls.c?rev=161124&view=auto > ============================================================================== > --- cfe/trunk/test/Sema/tls.c (added) > +++ cfe/trunk/test/Sema/tls.c Wed Aug 1 13:53:19 2012 > @@ -0,0 +1,20 @@ > +// Test that TLS is correctly considered supported or unsupported for the > +// different targets. > + > +// Linux supports TLS. > +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu %s > +// RUN: %clang_cc1 -triple i386-pc-linux-gnu %s > + > +// Darwin supports TLS since 10.7. > +// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 %s > +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 %s > + > +// FIXME: I thought it was supported actually? > +// RUN: %clang_cc1 -verify -triple x86_64-pc-win32 %s > +// RUN: %clang_cc1 -verify -triple i386-pc-win32 %s > + > +// OpenBSD does not suppport TLS. > +// RUN: %clang_cc1 -verify -triple x86_64-pc-openbsd %s > +// RUN: %clang_cc1 -verify -triple i386-pc-openbsd %s > + > +__thread int x; // expected-error {{thread-local storage is unsupported for > the current target}} > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
