Clang regressions with a TLS-unsupported default target

Our team is building a clang/llvm toolchain which supports a target that does not support C/C++ TLS.

My first email regarded a python binding test that failed during ‘check-all’ which assumed TLS support.

We are now running the lit regression tests and have come across more failures. The failures mostly appear in C/C++ code as verify failures:

// expected-error {{thread_local variable}}

Our build of clang emits “error: ‘error’ diagnostics seen but not expected: ‘thread-local storage is not supported for the current target’”

I’m curious if we’ve missed some sort of configuration in CMake or in the lit config which would allow us to pass these tests without TLS support. Often times, these tests are 90% relevant, and then fail because of a single line of code. Without some sort of mechanism.

Here’s an incomplete list of tests that our toolchain fails as examples:

  • CXX/dcl.dcl/dcl.spec/dcl.constinit/p1.cpp

  • CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp

  • FixIt/fixit-c++2a.cpp

  • Parser/cxx1z-decomposition.cpp

  • Parser/cxx1z-class-template-argument-deduction.cpp

  • SemaCXX/attr-require-constant-initialization.cpp

  • SemaCXX/auto-cxx0x.cpp

  • SemaCXX/cxx17-compat.cpp


J.B. Nagurne

Code Generation

Texas Instruments