[Lldb-commits] [PATCH] D140671: [lldb] [utils] Fix linking lit-cpuid to LLVM dylib

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 26 05:34:20 PST 2022

mgorny created this revision.
mgorny added reviewers: labath, sylvestre.ledru, JDevlieghere, MaskRay.
Herald added subscribers: StephenFan, delcypher.
Herald added a project: All.
mgorny requested review of this revision.

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 <https://reviews.llvm.org/rGf09cf34d00625e57dea5317a3ac0412c07292148>.



Index: lldb/utils/lit-cpuid/CMakeLists.txt
--- lldb/utils/lit-cpuid/CMakeLists.txt
+++ lldb/utils/lit-cpuid/CMakeLists.txt
@@ -1,6 +1,9 @@
+    Support
+    TargetParser
-target_link_libraries(lit-cpuid PRIVATE LLVMSupport LLVMTargetParser)
 set_target_properties(lit-cpuid PROPERTIES FOLDER "lldb utils")

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140671.485297.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221226/6e450dab/attachment.bin>

More information about the lldb-commits mailing list