diff options
| author | Alexey Samsonov <samsonov@google.com> | 2014-04-02 09:36:36 +0000 |
|---|---|---|
| committer | Alexey Samsonov <samsonov@google.com> | 2014-04-02 09:36:36 +0000 |
| commit | 2c66a22e564feab3674e431700d1932908fba340 (patch) | |
| tree | 8e51d1b08aa0aadf590a6f3657f9ad772dd79979 /compiler-rt | |
| parent | 8dbf3faa16793eff66c18ae5a4d4161a75181d96 (diff) | |
| download | bcm5719-llvm-2c66a22e564feab3674e431700d1932908fba340.tar.gz bcm5719-llvm-2c66a22e564feab3674e431700d1932908fba340.zip | |
[ASan] One more attempt to fix Android build
llvm-svn: 205411
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/lib/asan/asan_linux.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler-rt/lib/asan/asan_linux.cc b/compiler-rt/lib/asan/asan_linux.cc index 962a0abc07b..8ad9de781a4 100644 --- a/compiler-rt/lib/asan/asan_linux.cc +++ b/compiler-rt/lib/asan/asan_linux.cc @@ -76,7 +76,11 @@ void *AsanDoesNotSupportStaticLinkage() { return &_DYNAMIC; // defined in link.h } -#if !SANITIZER_ANDROID +#if SANITIZER_ANDROID +// FIXME: should we do anything for Android? +void AsanCheckDynamicRTPrereqs() {} +void AsanCheckIncompatibleRT() {} +#else static int FindFirstDSOCallback(struct dl_phdr_info *info, size_t size, void *data) { // Continue until the first dynamic library is found @@ -86,7 +90,6 @@ static int FindFirstDSOCallback(struct dl_phdr_info *info, size_t size, *(const char **)data = info->dlpi_name; return 1; } -#endif static bool IsDynamicRTName(const char *libname) { return internal_strstr(libname, "libclang_rt.asan") || @@ -94,8 +97,6 @@ static bool IsDynamicRTName(const char *libname) { } void AsanCheckDynamicRTPrereqs() { - // FIXME: can we do something like this for Android? -#if !SANITIZER_ANDROID // Ensure that dynamic RT is the first DSO in the list const char *first_dso_name = 0; dl_iterate_phdr(FindFirstDSOCallback, &first_dso_name); @@ -105,11 +106,9 @@ void AsanCheckDynamicRTPrereqs() { "manually preload it with LD_PRELOAD.\n"); Die(); } -#endif } void AsanCheckIncompatibleRT() { -#if !SANITIZER_ANDROID if (ASAN_DYNAMIC) { if (__asan_rt_version == ASAN_RT_VERSION_UNDEFINED) { __asan_rt_version = ASAN_RT_VERSION_DYNAMIC; @@ -136,8 +135,8 @@ void AsanCheckIncompatibleRT() { CHECK_NE(__asan_rt_version, ASAN_RT_VERSION_DYNAMIC); __asan_rt_version = ASAN_RT_VERSION_STATIC; } -#endif } +#endif // SANITIZER_ANDROID void GetPcSpBp(void *context, uptr *pc, uptr *sp, uptr *bp) { #if defined(__arm__) |

