[PATCH] D24351: cmake: Install the OCaml libraries in a package subdirectory

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 8 10:01:24 PDT 2016


mgorny created this revision.
mgorny added a reviewer: whitequark.
mgorny added a subscriber: llvm-commits.
Herald added a subscriber: beanz.

Install the OCaml libraries in a dedicated subdirectory of lib/ocaml rather than top-level.

The top-level directory is reserved for the standard library, and has precedence over local directory in search path. As a result, OCaml preferred the files installed along with previous LLVM version over the source tree when building a new version, resulting in two versions being mixed during the build.

The subdirectory layout is the standard layout used by other OCaml packages, and findlib is able to find the LLVM libraries successfully in the subdirectory.

Bug: https://bugs.gentoo.org/559624


https://reviews.llvm.org/D24351

Files:
  cmake/modules/AddOCaml.cmake

Index: cmake/modules/AddOCaml.cmake
===================================================================
--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -193,12 +193,12 @@
   endforeach()
 
   install(FILES ${install_files}
-          DESTINATION lib/ocaml)
+          DESTINATION lib/ocaml/llvm)
   install(FILES ${install_shlibs}
           PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE
                       GROUP_READ GROUP_EXECUTE
                       WORLD_READ WORLD_EXECUTE
-          DESTINATION lib/ocaml)
+          DESTINATION lib/ocaml/llvm)
 
   foreach( install_file ${install_files} ${install_shlibs} )
     get_filename_component(filename "${install_file}" NAME)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24351.70718.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160908/45121ed8/attachment.bin>


More information about the llvm-commits mailing list