[compiler-rt] r317907 - [scudo] Bump the Android API level requirement to 21 for getauxval

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 11:01:17 PST 2017


Author: cryptoad
Date: Fri Nov 10 11:01:17 2017
New Revision: 317907

URL: http://llvm.org/viewvc/llvm-project?rev=317907&view=rev
Log:
[scudo] Bump the Android API level requirement to 21 for getauxval

Summary:
`getauxval` was introduced in 18 & 21 depending on the architecture. Bump the
requirement to 21.

It also turns out that the NDK is finicky: NDK r13b doesn't include sys/auxv.h
when creating a standalone toolchain at API level 19 for ARM. So 18 didn't work
well with older NDKs.

Reviewers: alekseyshl

Reviewed By: alekseyshl

Subscribers: aemerson, srhines, llvm-commits, kristof.beyls

Differential Revision: https://reviews.llvm.org/D39905

Modified:
    compiler-rt/trunk/lib/scudo/scudo_utils.cpp

Modified: compiler-rt/trunk/lib/scudo/scudo_utils.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/scudo/scudo_utils.cpp?rev=317907&r1=317906&r2=317907&view=diff
==============================================================================
--- compiler-rt/trunk/lib/scudo/scudo_utils.cpp (original)
+++ compiler-rt/trunk/lib/scudo/scudo_utils.cpp Fri Nov 10 11:01:17 2017
@@ -18,9 +18,9 @@
 # include <cpuid.h>
 #endif
 #if defined(__arm__) || defined(__aarch64__)
-# if SANITIZER_ANDROID && __ANDROID_API__ < 18
-// getauxval() was introduced with API level 18 on Android. Emulate it using
-// /proc/self/auxv for lower API levels.
+# if SANITIZER_ANDROID && __ANDROID_API__ < 21
+// getauxval() was introduced with API level 18 for ARM and 21 for AArch64.
+// Emulate it using /proc/self/auxv for lower API levels.
 #  include "sanitizer_common/sanitizer_posix.h"
 
 #  include <fcntl.h>




More information about the llvm-commits mailing list