[CMake][compiler-rt] Only set lld as available when it was built
authorPetr Hosek <phosek@google.com>
Thu, 11 Jun 2020 03:00:53 +0000 (20:00 -0700)
committerPetr Hosek <phosek@google.com>
Mon, 29 Jun 2020 22:09:05 +0000 (15:09 -0700)
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

compiler-rt/CMakeLists.txt

index 8619b6e..fa62814 100644 (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)