[PATCH] D24442: cmake: Specify library dependences even without BUILD_SHARED_LIBS
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 13:50:15 PDT 2016
grosser added a comment.
Hi Michael,
thank you for your feedback. This error happens with:
-DBUILD_SHARED_LIBS=ON -DPOLLY_ENABLE_GPGPU_CODEGEN=ON
> Wouldn't it be a lot easier to target_link_libraries(opt LLVMTarget) if LINK_POLLY_INTO_TOOLS?
Like:
--- a/tools/bugpoint/CMakeLists.txt
+++ b/tools/bugpoint/CMakeLists.txt
@@ -39,4 +39,5 @@ if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
target_link_libraries(bugpoint ${lib})
endforeach(lib)
endif(POLLY_LINK_LIBS)
target_link_libraries(bugpoint LLVMTarget)
endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
This works as well. LLVMTarget is already part of bugpoints target_link_libraries, but adding it again ensures it is added once more at the end of linker command line, such that it is available to cover symbols only used by Polly, but not by bugpoint.
If this is preferable, I could just add this line.
https://reviews.llvm.org/D24442
More information about the llvm-commits
mailing list