forked from OSchip/llvm-project
[BOLT-UnitTests] Fix shared libraries build
Fix build with `-DBUILD_SHARED_LIBS=ON` (add explicit deps). Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D119042
This commit is contained in:
parent
b9d4fe87e1
commit
eddf384965
|
@ -1,23 +1,25 @@
|
|||
set(LLVM_LINK_COMPONENTS
|
||||
BOLTCore
|
||||
BOLTRewrite
|
||||
DebugInfoDWARF
|
||||
Object
|
||||
${LLVM_TARGETS_TO_BUILD}
|
||||
)
|
||||
|
||||
add_bolt_unittest(CoreTests
|
||||
MCPlusBuilder.cpp
|
||||
)
|
||||
|
||||
string(FIND "${LLVM_TARGETS_TO_BUILD}" "AArch64" POSITION)
|
||||
if (NOT ${POSITION} EQUAL -1)
|
||||
if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD)
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/lib/Target/AArch64
|
||||
${CMAKE_BINARY_DIR}/lib/Target/AArch64
|
||||
${LLVM_MAIN_SRC_DIR}/lib/Target/AArch64
|
||||
${LLVM_BINARY_DIR}/lib/Target/AArch64
|
||||
)
|
||||
|
||||
target_compile_definitions(CoreTests PRIVATE AARCH64_AVAILABLE)
|
||||
endif()
|
||||
|
||||
string(FIND "${LLVM_TARGETS_TO_BUILD}" "X86" POSITION)
|
||||
if (NOT ${POSITION} EQUAL -1)
|
||||
if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD)
|
||||
include_directories(
|
||||
${LLVM_MAIN_SRC_DIR}/lib/Target/X86
|
||||
${LLVM_BINARY_DIR}/lib/Target/X86
|
||||
|
|
Loading…
Reference in New Issue