diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -925,6 +925,7 @@ get_property(llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS) foreach(llvm_plugin_target ${llvm_plugin_targets}) set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension}) + set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES "obj.${llvm_extension}") set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension}) endforeach() endforeach()