OSDN Git Service

scudo: Change the macro used to check whether we're targeting the platform.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 21 Apr 2020 22:30:50 +0000 (15:30 -0700)
committerPeter Collingbourne <peter@pcc.me.uk>
Wed, 22 Apr 2020 17:32:51 +0000 (10:32 -0700)
Differential Revision: https://reviews.llvm.org/D78594

compiler-rt/lib/scudo/standalone/combined.h

index 51e0c5d..b44753a 100644 (file)
 
 extern "C" inline void EmptyCallback() {}
 
-#if SCUDO_ANDROID && __ANDROID_API__ == 10000
+#ifdef HAVE_ANDROID_UNSAFE_FRAME_POINTER_CHASE
 // This function is not part of the NDK so it does not appear in any public
-// header files. We only declare/use it when targeting the platform (i.e. API
-// level 10000).
+// header files. We only declare/use it when targeting the platform.
 extern "C" size_t android_unsafe_frame_pointer_chase(scudo::uptr *buf,
                                                      size_t num_entries);
 #endif
@@ -232,7 +231,7 @@ public:
   }
 
   NOINLINE u32 collectStackTrace() {
-#if SCUDO_ANDROID && __ANDROID_API__ == 10000
+#ifdef HAVE_ANDROID_UNSAFE_FRAME_POINTER_CHASE
     // Discard collectStackTrace() frame and allocator function frame.
     constexpr uptr DiscardFrames = 2;
     uptr Stack[MaxTraceSize + DiscardFrames];