tsan: fix Go build

llvm-svn: 164198
This commit is contained in:
Dmitry Vyukov 2012-09-19 04:39:36 +00:00
parent 43dd07ec3e
commit c7bcaf8512
3 changed files with 5 additions and 2 deletions

View File

@ -55,7 +55,7 @@ for F in $SRCS; do
cat $F >> gotsan.cc
done
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -fPIC -g -Wall -Werror -fno-exceptions -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4"
FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -fPIC -Wall -Werror -fno-exceptions -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4"
if [ "$DEBUG" == "" ]; then
FLAGS+=" -DTSAN_DEBUG=0 -O3 -fomit-frame-pointer"
else

View File

@ -124,7 +124,6 @@ void InitializeShadowMemory() {
DPrintf("stack %zx\n", (uptr)&shadow);
}
static uptr g_tls_size;
static uptr g_data_start;
static uptr g_data_end;
@ -167,6 +166,8 @@ static void InitDataSeg() {
CHECK_LT((uptr)&g_data_start, g_data_end);
}
static uptr g_tls_size;
#ifdef __i386__
# define INTERNAL_FUNCTION __attribute__((regparm(3), stdcall))
#else

View File

@ -186,10 +186,12 @@ void Initialize(ThreadState *thr) {
InitializeMemoryProfile();
InitializeMemoryFlush();
#ifndef TSAN_GO
const char *external_symbolizer = flags()->external_symbolizer_path;
if (external_symbolizer != 0 && external_symbolizer[0] != '\0') {
InitializeExternalSymbolizer(external_symbolizer);
}
#endif
if (ctx->flags.verbosity)
TsanPrintf("***** Running under ThreadSanitizer v2 (pid %d) *****\n",