forked from OSchip/llvm-project
tsan: add Go race detector support for macOS/ARM64
Add Go race detector support for macOS/ARM64. The Go counterpart is https://golang.org/cl/266373 . Author: cherry (Cherry Zhang) Reviewed-in: https://reviews.llvm.org/D90435
This commit is contained in:
parent
d273cb6090
commit
00da38ce2d
|
@ -117,9 +117,7 @@ elif [ "`uname -a | grep NetBSD`" != "" ]; then
|
|||
../../sanitizer_common/sanitizer_stoptheworld_netbsd_libcdep.cpp
|
||||
"
|
||||
elif [ "`uname -a | grep Darwin`" != "" ]; then
|
||||
SUFFIX="darwin_amd64"
|
||||
OSCFLAGS="-fPIC -Wno-unused-const-variable -Wno-unknown-warning-option -mmacosx-version-min=10.7"
|
||||
ARCHCFLAGS="-m64"
|
||||
OSLDFLAGS="-lpthread -fPIC -fpie -mmacosx-version-min=10.7"
|
||||
SRCS="
|
||||
$SRCS
|
||||
|
@ -130,6 +128,13 @@ elif [ "`uname -a | grep Darwin`" != "" ]; then
|
|||
../../sanitizer_common/sanitizer_posix_libcdep.cpp
|
||||
../../sanitizer_common/sanitizer_procmaps_mac.cpp
|
||||
"
|
||||
if [ "`uname -a | grep x86_64`" != "" ]; then
|
||||
SUFFIX="darwin_amd64"
|
||||
ARCHCFLAGS="-m64"
|
||||
elif [ "`uname -a | grep arm64`" != "" ]; then
|
||||
SUFFIX="darwin_arm64"
|
||||
ARCHCFLAGS=""
|
||||
fi
|
||||
elif [ "`uname -a | grep MINGW`" != "" ]; then
|
||||
SUFFIX="windows_amd64"
|
||||
OSCFLAGS="-Wno-error=attributes -Wno-attributes -Wno-unused-const-variable -Wno-unknown-warning-option"
|
||||
|
|
|
@ -461,7 +461,7 @@ struct Mapping47 {
|
|||
|
||||
#elif SANITIZER_GO && defined(__aarch64__)
|
||||
|
||||
/* Go on linux/aarch64 (48-bit VMA)
|
||||
/* Go on linux/aarch64 (48-bit VMA) and darwin/aarch64 (47-bit VMA)
|
||||
0000 0000 1000 - 0000 1000 0000: executable
|
||||
0000 1000 0000 - 00c0 0000 0000: -
|
||||
00c0 0000 0000 - 00e0 0000 0000: heap
|
||||
|
|
|
@ -234,7 +234,7 @@ static void my_pthread_introspection_hook(unsigned int event, pthread_t thread,
|
|||
#endif
|
||||
|
||||
void InitializePlatformEarly() {
|
||||
#if defined(__aarch64__)
|
||||
#if !SANITIZER_GO && defined(__aarch64__)
|
||||
uptr max_vm = GetMaxUserVirtualAddress() + 1;
|
||||
if (max_vm != Mapping::kHiAppMemEnd) {
|
||||
Printf("ThreadSanitizer: unsupported vm address limit %p, expected %p.\n",
|
||||
|
|
Loading…
Reference in New Issue