Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 59231e5

Browse files
committed
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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375472 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a3697b7 commit 59231e5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ else()
497497
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
498498
set(COMPILER_RT_HAS_LLD TRUE)
499499
else()
500-
set(COMPILER_RT_HAS_LLD FALSE)
500+
set(COMPILER_RT_HAS_LLD ${COMPILER_RT_HAS_FUSE_LD_LLD_FLAG})
501501
endif()
502502
endif()
503503
pythonize_bool(COMPILER_RT_HAS_LLD)

Diff for: cmake/config-ix.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
146146

147147
# Linker flags.
148148
check_linker_flag("-Wl,-z,text" COMPILER_RT_HAS_Z_TEXT)
149+
check_linker_flag("-fuse-ld=lld" COMPILER_RT_HAS_FUSE_LD_LLD_FLAG)
149150

150151
if(ANDROID)
151152
check_linker_flag("-Wl,-z,global" COMPILER_RT_HAS_Z_GLOBAL)

0 commit comments

Comments
 (0)