summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/cmake/modules/AddLLVM.cmake')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index bf9f3fc834d..bd22353b6cf 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -868,6 +868,12 @@ function(add_llvm_pass_plugin name)
endif()
option(LLVM_${name_upper}_LINK_INTO_TOOLS "Statically link ${name} into tools (if available)" ${link_into_tools_default})
+ # If we statically link the plugin, don't use llvm dylib because we're going
+ # to be part of it.
+ if(LLVM_${name_upper}_LINK_INTO_TOOLS)
+ list(APPEND ARG_UNPARSED_ARGUMENTS DISABLE_LLVM_LINK_LLVM_DYLIB)
+ endif()
+
if(LLVM_${name_upper}_LINK_INTO_TOOLS)
list(REMOVE_ITEM ARG_UNPARSED_ARGUMENTS BUILDTREE_ONLY)
# process_llvm_pass_plugins takes care of the actual linking, just create an
OpenPOWER on IntegriCloud