================
@@ -194,18 +194,20 @@ macro(add_clang_symlink name dest)
 endmacro()
 
 function(clang_target_link_libraries target type)
-  if (TARGET obj.${target})
-    target_link_libraries(obj.${target} ${ARGN})
-  endif()
-
   get_property(LLVM_DRIVER_TOOLS GLOBAL PROPERTY LLVM_DRIVER_TOOLS)
   if(LLVM_TOOL_LLVM_DRIVER_BUILD AND ${target} IN_LIST LLVM_DRIVER_TOOLS)
     set(target llvm-driver)
   endif()
 
   if (CLANG_LINK_CLANG_DYLIB)
     target_link_libraries(${target} ${type} clang-cpp)
+    if (TARGET obj.${target})
+      target_link_libraries(obj.${target} clang-cpp)
+    endif()
   else()
     target_link_libraries(${target} ${type} ${ARGN})
+    if (TARGET obj.${target})
+      target_link_libraries(obj.${target} ${ARGN})
----------------
llvm-beanz wrote:

```suggestion
      target_link_libraries(obj.${target} INTERFACE ${ARGN})
```

https://github.com/llvm/llvm-project/pull/93454
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to