diff options
author | Michał Górny <mgorny@gentoo.org> | 2020-06-16 12:16:52 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2020-06-17 19:00:26 +0200 |
commit | 352558e69b3691cfdc8e1adc2a1fbb737bc67cbb (patch) | |
tree | b300d1a96cd48c1f5458935aca06c837405b1f65 /llvm/tools/llvm-cfi-verify | |
parent | 5c621900a6614d6e27843c14157b4c2630c124c5 (diff) | |
download | llvm-352558e69b3691cfdc8e1adc2a1fbb737bc67cbb.zip llvm-352558e69b3691cfdc8e1adc2a1fbb737bc67cbb.tar.gz llvm-352558e69b3691cfdc8e1adc2a1fbb737bc67cbb.tar.bz2 |
[llvm] Avoid linking llvm-cfi-verify to duplicate libs
Fix the CMake rules for LLVMCFIVerify library not to pull duplicate
LLVM .a libraries when linking to the dylib. This prevents problems
due to duplicate symbols and apparently fixes mingw32.
This is an alternative approach to D44650 that just forces .a libraries
instead. However, there doesn't seem to be any reason to do that.
Differential Revision: https://reviews.llvm.org/D81921
Diffstat (limited to 'llvm/tools/llvm-cfi-verify')
-rw-r--r-- | llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt index 82ca42e..41d55ed 100644 --- a/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt +++ b/llvm/tools/llvm-cfi-verify/lib/CMakeLists.txt @@ -7,13 +7,17 @@ add_library(LLVMCFIVerify ) llvm_update_compile_flags(LLVMCFIVerify) -llvm_map_components_to_libnames(libs - DebugInfoDWARF - MC - MCParser - Object - Support - Symbolize - ) +if (LLVM_LINK_LLVM_DYLIB) + set(libs LLVM) +else() + llvm_map_components_to_libnames(libs + DebugInfoDWARF + MC + MCParser + Object + Support + Symbolize + ) +endif() target_link_libraries(LLVMCFIVerify ${libs}) set_target_properties(LLVMCFIVerify PROPERTIES FOLDER "Libraries") |