mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
[cmake] Fix LLVM_LINK_LLVM_DYLIB build, again
The llvm_config hack for lldb-server is only necessary for !DYLIB builds, as otherwise we would get unresolved symbols from lldb libraries which do not track their dependencies correctly (all of them). In a DYLIB build, the so will already be added to the link dependencies and we can use that to resolve all missing symbols. The proper fix for this would be to have each lldb library track its dependencies correctly. llvm-svn: 291555
This commit is contained in:
parent
f440244d67
commit
e92b965bbf
@ -183,7 +183,13 @@ else()
|
||||
target_link_libraries(lldb-server ${LLDB_USED_LIBS})
|
||||
target_link_libraries(lldb-server ${CLANG_USED_LIBS})
|
||||
endif()
|
||||
llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
|
||||
if(NOT LLVM_LINK_LLVM_DYLIB)
|
||||
# This is necessary in !LLVM_LINK_LLVM_DYLIB as LLDB's libs do not track their
|
||||
# dependencies properly. It is conditional because in a LLVM_LINK_LLVM_DYLIB
|
||||
# build it would introduce duplicate symbols (add_lldb_tool links to libLLVM,
|
||||
# and this would add the individual .a files as well).
|
||||
llvm_config(lldb-server ${LLVM_LINK_COMPONENTS})
|
||||
endif()
|
||||
|
||||
target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user