[CMake][compiler-rt] Only set lld as available when it was built

The `-fuse-ld=lld` check might succeed because there's a system lld,
but that lld may be out-of-date which would cause any tests that
attempt to use for LTO fail. This was observed on some of the bots.

Differential Revision: https://reviews.llvm.org/D81629
This commit is contained in:
Petr Hosek 2020-06-10 20:00:53 -07:00
parent ee394e6842
commit cf1d044843
1 changed files with 0 additions and 2 deletions

View File

@ -535,8 +535,6 @@ else()
set(COMPILER_RT_LLD_PATH ${LLVM_MAIN_SRC_DIR}/../lld)
if(EXISTS ${COMPILER_RT_LLD_PATH}/ AND LLVM_TOOL_LLD_BUILD)
set(COMPILER_RT_HAS_LLD TRUE)
else()
set(COMPILER_RT_HAS_LLD ${COMPILER_RT_HAS_FUSE_LD_LLD_FLAG})
endif()
endif()
pythonize_bool(COMPILER_RT_HAS_LLD)