<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><br></div>
Fair enough.  I'm using cmake to build, so I added the flag with -DLIBCXX_CXX_FEATURE_FLAGS=-<u></u>fsanitize=thread<br></blockquote><div>I afraid this is not going to work. tsan-instrumented libc++.so can be used only with tsan-instrumented binaries. </div>
<div>With non-instrumented binaries you will be getting link time errors (just like you did).</div><div>BTW, I filed a bug for better build/test system support: <a href="https://code.google.com/p/thread-sanitizer/issues/detail?id=48">https://code.google.com/p/thread-sanitizer/issues/detail?id=48</a></div>
<div><br></div><div>--kcc </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I'm getting some undefined symbol: __tsan_init whilst building anything. </blockquote>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
If I use the instrumented libc++, would it not have a negative performance impact on every application that uses it?  Should I build it with a different name and then use -nostdlib -lc++-tsan in my tsan specific build?  I guess I could even add libc++ to my projects cmake build and link to the one I built as part of that.<div class="">
<br></div></blockquote></div></div></div>