<div><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hello, I am trying to compile some code to LLVM IR with a simple "__thread int x" but hitting this error:</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

<div>    test.cpp:1:1: error: thread-local storage is unsupported for the current target</div><div><br></div><div>I'm using both the -S and -emit-llvm options on clang, and was expecting to see "@x = thread_local global i32 0" come out of clang.</div>

<div><br></div><div>I am curious why clang even cares about this since its my understanding it woud just attach thread_local to the declaration and then allow me to handle it later on in llc to do the actual traget specific implementation.  Can someone help clear where the thread-local implementation should go?</div>

<div><br></div><div>Thanks,</div><div>-Stephen</div></div></div>