[PATCH] D78332: Fix interaction of static plugins with -DLLVM_LINK_LLVM_DYLIB=ON.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 11:55:23 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4623c2ffa4cf: Fix interaction of static plugins with -DLLVM_LINK_LLVM_DYLIB=ON. (authored by efriedma).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78332/new/
https://reviews.llvm.org/D78332
Files:
llvm/cmake/modules/AddLLVM.cmake
polly/lib/CMakeLists.txt
Index: polly/lib/CMakeLists.txt
===================================================================
--- polly/lib/CMakeLists.txt
+++ polly/lib/CMakeLists.txt
@@ -107,7 +107,7 @@
llvm_map_components_to_libnames(nvptx_libs NVPTX)
endif ()
-if (LLVM_LINK_LLVM_DYLIB)
+if (LLVM_LINK_LLVM_DYLIB AND NOT LLVM_POLLY_LINK_INTO_TOOLS)
# The shlib/dylib contains all the LLVM components
# (including NVPTX is enabled) already. Adding them to target_link_libraries
# would cause them being twice in the address space
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -883,7 +883,7 @@
list(REMOVE_ITEM ARG_UNPARSED_ARGUMENTS BUILDTREE_ONLY)
# process_llvm_pass_plugins takes care of the actual linking, just create an
# object library as of now
- add_llvm_library(${name} OBJECT ${ARG_UNPARSED_ARGUMENTS})
+ add_llvm_component_library(${name} OBJECT ${ARG_UNPARSED_ARGUMENTS})
target_compile_definitions(${name} PRIVATE LLVM_${name_upper}_LINK_INTO_TOOLS)
set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS LLVM_LINK_INTO_TOOLS)
if (TARGET intrinsics_gen)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78332.258389.patch
Type: text/x-patch
Size: 1243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200417/5e9c225c/attachment-0001.bin>
More information about the llvm-commits
mailing list