diff options
author | Yabin Cui <yabinc@google.com> | 2016-04-05 05:37:48 +0000 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2016-04-05 05:37:48 +0000 |
commit | c7db569cc1235280dc58473b78064fa7b5f7f7b1 (patch) | |
tree | 4a8c26f9868ce4c1cddd7a84599d2128d3fcbbdf | |
parent | 583b1a8a1bc5c4d0bfec0a38effe81a39d480d06 (diff) | |
download | bcm5719-llvm-c7db569cc1235280dc58473b78064fa7b5f7f7b1.tar.gz bcm5719-llvm-c7db569cc1235280dc58473b78064fa7b5f7f7b1.zip |
[tsan] Fix freebsd build.
Summary:
Freebsd doesn't have <sys/personality.h>, so call personality() only in
SANITIZER_LINUX.
Reviewers: llvm-commits, dvyukov, zatrazz, rengolin, beanz
Subscribers: beanz, emaste
Differential Revision: http://reviews.llvm.org/D18785
llvm-svn: 265378
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc index d85a53e0c0e..c10fce5637e 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc @@ -36,7 +36,9 @@ #include <string.h> #include <stdarg.h> #include <sys/mman.h> +#if SANITIZER_LINUX #include <sys/personality.h> +#endif #include <sys/syscall.h> #include <sys/socket.h> #include <sys/time.h> @@ -292,7 +294,7 @@ void InitializePlatform() { SetAddressSpaceUnlimited(); reexec = true; } -#if defined(__aarch64__) +#if SANITIZER_LINUX && defined(__aarch64__) // After patch "arm64: mm: support ARCH_MMAP_RND_BITS." is introduced in // linux kernel, the random gap between stack and mapped area is increased // from 128M to 36G on 39-bit aarch64. As it is almost impossible to cover |