cmake: Add additional libraries to fix the darwin shared library build

darwin requires the additional linkages of...

LLVMBitReader
LLVMMCParser
LLVMObject
LLVMProfileData
LLVMTarget
LLVMVectorize

as the darwin requires all of the weak undefined symbols in a library to be
resolved when linking it against an executable (unless
-Wl,-undefined,dynamic_lookup is used to override the default behavior of
-Wl,-undefined,error).

Contributed-by: Jack Howarth
llvm-svn: 259332
This commit is contained in:
Tobias Grosser 2016-01-31 20:25:46 +00:00
parent b9f42468ad
commit ed873cd3c1
1 changed files with 7 additions and 0 deletions

View File

@ -66,6 +66,13 @@ if (BUILD_SHARED_LIBS)
LLVMAnalysis
LLVMipo
LLVMMC
# The libraries below are required for darwin: http://PR26392
LLVMBitReader
LLVMMCParser
LLVMObject
LLVMProfileData
LLVMTarget
LLVMVectorize
)
link_directories(
${LLVM_LIBRARY_DIR}