[PATCH] D119042: [BOLT-UnitTests] Fix shared libraries build
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 15:05:22 PST 2022
Amir created this revision.
Amir added reviewers: maksfb, rafauler, yota9.
Herald added subscribers: ayermolo, mgorny.
Amir requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Fix build with `-DBUILD_SHARED_LIBS=ON` (add explicit deps).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119042
Files:
bolt/unittests/Core/CMakeLists.txt
Index: bolt/unittests/Core/CMakeLists.txt
===================================================================
--- bolt/unittests/Core/CMakeLists.txt
+++ bolt/unittests/Core/CMakeLists.txt
@@ -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119042.406114.patch
Type: text/x-patch
Size: 1034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220204/e473e4de/attachment.bin>
More information about the llvm-commits
mailing list