[compiler-rt] r269293 - Fixup for r269291, which broke the Go TSan build. Let's not use the symbolizer in Go builds.
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 03:04:42 PDT 2016
Any specific suggestions how to do that for SANITIZER_GO? Currently, SANITIZER_GO isn’t even guaranteed to be “0” or “1”, instead it’s either defined or not. That would be a simple change, but we’ll need to change all uses of SANITIZER_GO from #ifdef to #if.
Then it’s still not easy to just “if (SANITIZER_GO)”, because in this case (and plenty of others), we’ll just fail to link. The symbolizer stuff isn't built in a Go build. We *might* be able to link fine with -O<something> because the if(0) will be dead-code-removed, but that just makes the situation even worse (some configurations build, some don’t).
Kuba
> On 12 May 2016, at 22:05, Kostya Serebryany <kcc at google.com> wrote:
>
>
>
> On Thu, May 12, 2016 at 6:28 AM, Kuba Brecka via llvm-commits <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
> Author: kuba.brecka
> Date: Thu May 12 08:28:45 2016
> New Revision: 269293
>
> URL: http://llvm.org/viewvc/llvm-project?rev=269293&view=rev <http://llvm.org/viewvc/llvm-project?rev=269293&view=rev>
> Log:
> Fixup for r269291, which broke the Go TSan build. Let's not use the symbolizer in Go builds.
>
>
> Modified:
> compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
>
> Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=269293&r1=269292&r2=269293&view=diff <http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=269293&r1=269292&r2=269293&view=diff>
> ==============================================================================
> --- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
> +++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Thu May 12 08:28:45 2016
> @@ -370,7 +370,9 @@ void Initialize(ThreadState *thr) {
> #endif
> ctx->initialized = true;
>
>
> We have too many #ifndef SANITIZER_GO.
> Can we replace at least some of them with if (!SANITIZER_GO)?
> Pleeeeeeaseee.
>
> +#ifndef SANITIZER_GO
> Symbolizer::LateInitialize();
> +#endif
>
> if (flags()->stop_on_start) {
> Printf("ThreadSanitizer is suspended at startup (pid %d)."
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160513/3f37c63d/attachment.html>
More information about the llvm-commits
mailing list