summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-10-21 23:59:45 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-10-21 23:59:45 +0000
commitd56203201f8a1f11abb913c4dfc0bf9c61432d1a (patch)
tree9e64e136c3bf49a5c3776c9df4ee8bf6bbe728d7
parente17b658fc75337c1de0cdd467f35cfa4a85939b1 (diff)
downloadbcm5719-llvm-d56203201f8a1f11abb913c4dfc0bf9c61432d1a.tar.gz
bcm5719-llvm-d56203201f8a1f11abb913c4dfc0bf9c61432d1a.zip
Fix lld detection in standalone compiler-rt.
Summary: Right now all hwasan tests on Android are silently disabled because they require "has_lld" and standalone compiler-rt can not (and AFAIK was never able to) set it. Reviewers: pcc, dyung Subscribers: dberris, mgorny, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D69196 llvm-svn: 375472
-rw-r--r--compiler-rt/CMakeLists.txt2
-rw-r--r--compiler-rt/cmake/config-ix.cmake1
2 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 50d0eb0ed90..f8925ab2d76 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -497,7 +497,7 @@ else()
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
set(COMPILER_RT_HAS_LLD TRUE)
else()
- set(COMPILER_RT_HAS_LLD FALSE)
+ set(COMPILER_RT_HAS_LLD ${COMPILER_RT_HAS_FUSE_LD_LLD_FLAG})
endif()
endif()
pythonize_bool(COMPILER_RT_HAS_LLD)
diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake
index 875acc83be4..bc81a7b9d96 100644
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -146,6 +146,7 @@ check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.
check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
+check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
if(ANDROID)
check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)
OpenPOWER on IntegriCloud