diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-12-26 14:30:35 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-12-26 19:03:25 +0100 |
commit | dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6 (patch) | |
tree | 82cefb68993df971bcc26cede989482ce50247dc | |
parent | 60359f56aaafac6adee5fa23932f790e6f19bf81 (diff) | |
download | llvm-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.zip llvm-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.gz llvm-dfc20708bcdf7b4c4bea8595fc4ac8674634d5e6.tar.bz2 |
[lldb] [utils] Fix linking lit-cpuid to LLVM dylib
Use `LINK_COMPONENTS` instead of manual `target_link_libraries` to link
lit-cpuid to LLVM components. This ensures that dylib is used along
with `LLVM_LINK_LLVM_DYLIB` rather than linking to component libraries
that may not be installed.
This fixes build failure on Gentoo after a dep on TargetParser component
was added in f09cf34d00625e57dea5317a3ac0412c07292148.
Differential Revision: https://reviews.llvm.org/D140671
-rw-r--r-- | lldb/utils/lit-cpuid/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/utils/lit-cpuid/CMakeLists.txt b/lldb/utils/lit-cpuid/CMakeLists.txt index 630e81e..a151b98 100644 --- a/lldb/utils/lit-cpuid/CMakeLists.txt +++ b/lldb/utils/lit-cpuid/CMakeLists.txt @@ -1,6 +1,9 @@ add_lldb_executable(lit-cpuid lit-cpuid.cpp + + LINK_COMPONENTS + Support + TargetParser ) -target_link_libraries(lit-cpuid PRIVATE LLVMSupport LLVMTargetParser) set_target_properties(lit-cpuid PROPERTIES FOLDER "lldb utils") |