[compiler-rt] r208763 - [asan] tyring to fix the Android build

Kostya Serebryany kcc at google.com
Wed May 14 02:21:23 PDT 2014


Author: kcc
Date: Wed May 14 04:21:22 2014
New Revision: 208763

URL: http://llvm.org/viewvc/llvm-project?rev=208763&view=rev
Log:
[asan] tyring to fix the Android build

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc?rev=208763&r1=208762&r2=208763&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc Wed May 14 04:21:22 2014
@@ -24,6 +24,9 @@
 
 #if SANITIZER_LINUX
 #include <sys/utsname.h>
+#endif
+
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
 #include <sys/personality.h>
 #endif
 
@@ -52,6 +55,7 @@ static uptr GetKernelAreaSize() {
       return 0;
   }
 
+#if !SANITIZER_ANDROID
   // Even if nothing is mapped, top Gb may still be accessible
   // if we are running on 64-bit kernel.
   // Uname may report misleading results if personality type
@@ -62,6 +66,7 @@ static uptr GetKernelAreaSize() {
       && uname(&uname_info) == 0
       && internal_strstr(uname_info.machine, "64"))
     return 0;
+#endif  // SANITIZER_ANDROID
 
   // Top gigabyte is reserved for kernel.
   return gbyte;





More information about the llvm-commits mailing list