[PATCH] D39020: Made shlib compile explicitly AFTER all tools.
Mitch Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 16:59:59 PDT 2017
hctim updated this revision to Diff 119404.
hctim added a comment.
Explicitly made llvm-cfi-verify build its own library that is statically linked into CFIVerifyTests. The target is not linked into the dynamic library when LLVM_BUILD_LLVM_DYLIB is enabled.
https://reviews.llvm.org/D39020
Files:
tools/llvm-cfi-verify/lib/CMakeLists.txt
unittests/tools/llvm-cfi-verify/CMakeLists.txt
Index: unittests/tools/llvm-cfi-verify/CMakeLists.txt
===================================================================
--- unittests/tools/llvm-cfi-verify/CMakeLists.txt
+++ unittests/tools/llvm-cfi-verify/CMakeLists.txt
@@ -4,7 +4,6 @@
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
- CFIVerify
MC
MCParser
Object
@@ -15,4 +14,6 @@
if (NOT x86_idx LESS 0)
add_llvm_unittest(CFIVerifyTests
FileAnalysis.cpp)
+ target_link_libraries(CFIVerifyTests LLVMCFIVerify)
+ export_executable_symbols(CFIVerifyTests)
endif()
Index: tools/llvm-cfi-verify/lib/CMakeLists.txt
===================================================================
--- tools/llvm-cfi-verify/lib/CMakeLists.txt
+++ tools/llvm-cfi-verify/lib/CMakeLists.txt
@@ -1,9 +1,14 @@
-add_llvm_library(LLVMCFIVerify
- FileAnalysis.cpp
- FileAnalysis.h
-
- LINK_COMPONENTS
+set(LLVM_LINK_COMPONENTS
MC
MCParser
Object
Support)
+
+add_library(LLVMCFIVerify
+ STATIC
+ FileAnalysis.cpp
+ FileAnalysis.h)
+
+llvm_update_compile_flags(LLVMCFIVerify)
+llvm_map_components_to_libnames(libs ${LLVM_LINK_COMPONENTS})
+target_link_libraries(LLVMCFIVerify ${libs})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39020.119404.patch
Type: text/x-patch
Size: 1168 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171017/90520b74/attachment.bin>
More information about the llvm-commits
mailing list