Skip to content

Commit

Permalink
[sanitizer] Add lld into dependency of sanitizer_common unittests
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@370007 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vitalybuka committed Aug 27, 2019
1 parent aa7dca3 commit 7cf57d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/Modules/AddCompilerRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down

0 comments on commit 7cf57d8

Please sign in to comment.