]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: an approach to tsan that works with gcc
authorMichael Hudson-Doyle <michael.hudson@canonical.com>
Mon, 2 May 2016 02:46:40 +0000 (14:46 +1200)
committerMichael Hudson-Doyle <michael.hudson@canonical.com>
Tue, 3 May 2016 00:49:46 +0000 (00:49 +0000)
commit499cd3371997bdb6e33377266754d20782ef134d
tree798fbd1ba6a5fa4f6ab30c4cf66cc83013eed483
parentf459660cb85abd504845f93fdb65b1932bd6ac37
cmd/cgo: an approach to tsan that works with gcc

GCC, unlike clang, does not provide any way for code being compiled to tell if
-fsanitize-thread was passed. But cgo can look to see if that flag is being
passed and generate different code in that case.

Fixes #14602

Change-Id: I86cb5318c2e35501ae399618c05af461d1252d2d
Reviewed-on: https://go-review.googlesource.com/22688
Run-TryBot: Michael Hudson-Doyle <michael.hudson@canonical.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/cgo/main.go
src/cmd/cgo/out.go