summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2018-10-02 16:19:42 +0000
committerStephen Hines <srhines@google.com>2018-10-02 16:19:42 +0000
commit5da4968cd6a92060a6e8966a72d6233d29b0dc30 (patch)
tree9f7bcef4288a38150ef72f42500d8cbdf6c35eff /CMakeLists.txt
parent02170f7766f4e124bdeaa62df4992b6cc101a5d7 (diff)
downloadcompiler-rt-5da4968cd6a92060a6e8966a72d6233d29b0dc30.tar.gz
[sanitizer] Use -Wl,-z,global on Android for sanitizers except UBsan
Summary: This essentially reverts r337010 since it breaks UBSan, which is used for a few platform libraries. The "-z global" flag is now added for Scudo as well. The only other sanitizer shared libraries are for asan and hwasan, which have also been reinstated to use the global flag. Reviewers: cryptoad, eugenis Reviewed By: cryptoad Subscribers: kubamracek, mgorny, delcypher, #sanitizers, nickdesaulniers, chh, kongyi, pirama, llvm-commits Differential Revision: https://reviews.llvm.org/D52770 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@343599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 0 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fbab64394..12bb52a4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -385,14 +385,6 @@ endif()
append_list_if(COMPILER_RT_HAS_LIBC c SANITIZER_COMMON_LINK_LIBS)
-if(ANDROID)
-# Put the Sanitizer shared libraries in the global group. For more details, see
-# android-changes-for-ndk-developers.md#changes-to-library-search-order
- if (COMPILER_RT_HAS_Z_GLOBAL)
- list(APPEND SANITIZER_COMMON_LINK_FLAGS -Wl,-z,global)
- endif()
-endif()
-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia")
list(APPEND SANITIZER_COMMON_LINK_FLAGS -Wl,-z,defs,-z,now,-z,relro)
list(APPEND SANITIZER_COMMON_LINK_LIBS zircon)