From c7db569cc1235280dc58473b78064fa7b5f7f7b1 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Tue, 5 Apr 2016 05:37:48 +0000 Subject: [PATCH] [tsan] Fix freebsd build. Summary: Freebsd doesn't have , 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 --- compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc b/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc index d85a53e0c..c10fce5 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 #include #include +#if SANITIZER_LINUX #include +#endif #include #include #include @@ -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 -- 2.7.4