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
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")