]> TLD Linux GIT Repositories - packages/llvm.git/blobdiff - llvm-ocaml-link-dylib.patch
- merged 17.0.4 from PLD
[packages/llvm.git] / llvm-ocaml-link-dylib.patch
diff --git a/llvm-ocaml-link-dylib.patch b/llvm-ocaml-link-dylib.patch
new file mode 100644 (file)
index 0000000..e382acd
--- /dev/null
@@ -0,0 +1,25 @@
+--- llvm-17.0.4.src/cmake/modules/AddOCaml.cmake.orig  2023-11-06 21:27:39.906604595 +0100
++++ llvm-17.0.4.src/cmake/modules/AddOCaml.cmake       2023-11-06 22:12:34.479135305 +0100
+@@ -69,7 +69,7 @@ function(add_ocaml_library name)
+   endif()
+   if(LLVM_LINK_LLVM_DYLIB)
+-    list(APPEND ocaml_flags "-lLLVM")
++    list(APPEND ocaml_flags "-lLLVM-17")
+   else()
+     explicit_map_components_to_libraries(llvm_libs ${ARG_LLVM})
+     foreach( llvm_lib ${llvm_libs} )
+@@ -186,9 +186,13 @@ function(add_ocaml_library name)
+   endforeach()
+   if( NOT LLVM_OCAML_OUT_OF_TREE )
++    if(LLVM_LINK_LLVM_DYLIB)
++      add_dependencies("ocaml_${name}" LLVM)
++    else()
+     foreach( llvm_lib ${llvm_libs} )
+       add_dependencies("ocaml_${name}" "${llvm_lib}")
+     endforeach()
++    endif()
+   endif()
+   add_dependencies("ocaml_all" "ocaml_${name}")