diff --git a/compiler-rt/lib/tsan/go/buildgo.sh b/compiler-rt/lib/tsan/go/buildgo.sh index 52a056ab6d1f..70e00cc7213d 100755 --- a/compiler-rt/lib/tsan/go/buildgo.sh +++ b/compiler-rt/lib/tsan/go/buildgo.sh @@ -26,7 +26,7 @@ SRCS=" if [ "`uname -a | grep Linux`" != "" ]; then SUFFIX="linux_amd64" - OSCFLAGS="-fPIC -ffreestanding -Wno-maybe-uninitialized" + OSCFLAGS="-fPIC -ffreestanding -Wno-maybe-uninitialized -Werror" OSLDFLAGS="-lpthread -fPIC -fpie" SRCS+=" ../rtl/tsan_platform_linux.cc @@ -65,7 +65,7 @@ for F in $SRCS; do cat $F >> gotsan.cc done -FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -m64 -Wall -Werror -fno-exceptions -fno-rtti -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4 $OSCFLAGS" +FLAGS=" -I../rtl -I../.. -I../../sanitizer_common -I../../../include -m64 -Wall -fno-exceptions -fno-rtti -DTSAN_GO -DSANITIZER_GO -DTSAN_SHADOW_COUNT=4 $OSCFLAGS" if [ "$DEBUG" == "" ]; then FLAGS+=" -DTSAN_DEBUG=0 -O3 -fomit-frame-pointer" else diff --git a/compiler-rt/lib/tsan/go/tsan_go.cc b/compiler-rt/lib/tsan/go/tsan_go.cc index 7c89402b62ea..df54bb8e216c 100644 --- a/compiler-rt/lib/tsan/go/tsan_go.cc +++ b/compiler-rt/lib/tsan/go/tsan_go.cc @@ -186,40 +186,6 @@ void __tsan_finalizer_goroutine(ThreadState *thr) { AcquireGlobal(thr, 0); } -#if SANITIZER_WINDOWS -// MinGW gcc emits calls to the function. -void ___chkstk_ms(void) { -// The implementation must be along the lines of: -// .code64 -// PUBLIC ___chkstk_ms -// //cfi_startproc() -// ___chkstk_ms: -// push rcx -// //cfi_push(%rcx) -// push rax -// //cfi_push(%rax) -// cmp rax, PAGE_SIZE -// lea rcx, [rsp + 24] -// jb l_LessThanAPage -// .l_MoreThanAPage: -// sub rcx, PAGE_SIZE -// or rcx, 0 -// sub rax, PAGE_SIZE -// cmp rax, PAGE_SIZE -// ja l_MoreThanAPage -// .l_LessThanAPage: -// sub rcx, rax -// or [rcx], 0 -// pop rax -// //cfi_pop(%rax) -// pop rcx -// //cfi_pop(%rcx) -// ret -// //cfi_endproc() -// END -} -#endif - } // extern "C" } // namespace __tsan