aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-03-01 01:45:01 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-03-01 01:45:01 +0000
commit1c36ae076800f4eb44d0683776fba650d04b6126 (patch)
tree9a6edb107ff750738d7783da1b7bd15ff9d49c19 /cmake
parentfad5fec3b3e92f34303bcf91a2be1af063d853bf (diff)
[sanitizer] Build everything whereever possible with -z text.
Reviewers: pcc, phosek Subscribers: mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58755 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config-ix.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 90192f7a6..ec35bf606 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -142,6 +142,8 @@ check_library_exists(c++ __cxa_throw "" COMPILER_RT_HAS_LIBCXX)
check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
+check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
+
if(ANDROID)
check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
check_library_exists(log __android_log_write "" COMPILER_RT_HAS_LIBLOG)