[compiler-rt] 0fd6f19 - [scudo][standalone] Support __BIONIC__

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 13:00:10 PST 2019


Author: Kostya Kortchinsky
Date: 2019-12-20T12:59:33-08:00
New Revision: 0fd6f19025a79e331bdbaf35541a2e90a95faa71

URL: https://github.com/llvm/llvm-project/commit/0fd6f19025a79e331bdbaf35541a2e90a95faa71
DIFF: https://github.com/llvm/llvm-project/commit/0fd6f19025a79e331bdbaf35541a2e90a95faa71.diff

LOG: [scudo][standalone] Support __BIONIC__

Summary:
Some Android builds that we are interested in define `__BIONIC__`
but not `__ANDROID__`, so expand `SCUDO_ANDROID` to encompass those.

Reviewers: cferris, hctim, pcc, eugenis, morehouse

Subscribers: krytarowski, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/platform.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/platform.h b/compiler-rt/lib/scudo/standalone/platform.h
index a897a566f9bf..a4c2a0b26603 100644
--- a/compiler-rt/lib/scudo/standalone/platform.h
+++ b/compiler-rt/lib/scudo/standalone/platform.h
@@ -9,13 +9,17 @@
 #ifndef SCUDO_PLATFORM_H_
 #define SCUDO_PLATFORM_H_
 
+// Transitive includes of stdint.h specify some of the defines checked below.
+#include <stdint.h>
+
 #if defined(__linux__)
 #define SCUDO_LINUX 1
 #else
 #define SCUDO_LINUX 0
 #endif
 
-#if defined(__ANDROID__)
+// See https://android.googlesource.com/platform/bionic/+/master/docs/defines.md
+#if defined(__BIONIC__)
 #define SCUDO_ANDROID 1
 #else
 #define SCUDO_ANDROID 0


        


More information about the llvm-commits mailing list