[compiler-rt] 1e1ae46 - [CMake] Prevent adding lld to test dependency (TEST_DEPS) when lld project is not built
Kelvin Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 13:42:42 PST 2019
Author: Kelvin Li
Date: 2019-11-05T16:42:30-05:00
New Revision: 1e1ae46595b1844e73b128d09739bbc57ea36f16
URL: https://github.com/llvm/llvm-project/commit/1e1ae46595b1844e73b128d09739bbc57ea36f16
DIFF: https://github.com/llvm/llvm-project/commit/1e1ae46595b1844e73b128d09739bbc57ea36f16.diff
LOG: [CMake] Prevent adding lld to test dependency (TEST_DEPS) when lld project is not built
D69405 causes failure if running LIT when the compiler was built without lld.
Patch by Anh Tuyen Tran (anhtuyen)
Differential Revision: https://reviews.llvm.org/D69685
Added:
Modified:
compiler-rt/cmake/Modules/AddCompilerRT.cmake
Removed:
################################################################################
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index b87ab6a91d42..bcb16584ff72 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
@@ -465,7 +465,7 @@ function(add_compiler_rt_test test_suite test_name arch)
set(TEST_LINK_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${TEST_LINK_FLAGS}")
separate_arguments(TEST_LINK_FLAGS)
endif()
- if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_HAS_LLD)
+ if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_HAS_LLD AND TARGET lld)
# CMAKE_EXE_LINKER_FLAGS may contain -fuse=lld
# FIXME: -DLLVM_ENABLE_LLD=ON and -DLLVM_ENABLE_PROJECTS without lld case.
list(APPEND TEST_DEPS lld)
More information about the llvm-commits
mailing list