summaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2019-08-27 02:06:34 +0000
committerVitaly Buka <vitalybuka@google.com>2019-08-27 02:06:34 +0000
commit7cf57d83a9d9c3092f290c6ad52c7f988448e6b8 (patch)
treee2e3164480963143f0a7dc61c0693cafb66329c6 /cmake/Modules
parentaa7dca304e35f729d046157b79569e16029bccd4 (diff)
downloadcompiler-rt-7cf57d83a9d9c3092f290c6ad52c7f988448e6b8.tar.gz
[sanitizer] Add lld into dependency of sanitizer_common unittests
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@370007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCompilerRT.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index 322e4221a..7c9505e66 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -465,6 +465,11 @@ 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)
+ # 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)
+ endif()
add_custom_command(
OUTPUT "${output_bin}"
COMMAND ${COMPILER_RT_TEST_COMPILER} ${TEST_OBJECTS} -o "${output_bin}"