1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/bindings/ocaml/llvm
Michal Gorny 51dd7d27dc cmake: Install the OCaml libraries into a more correct path
Add a OCAML_INSTALL_PATH variable that can be used to control
the install path for OCaml libraries. The new variable defaults to
${OCAML_STDLIB_PATH}, i.e. the OCaml library path obtained from
the OCaml compiler. Install libraries into "llvm" subdirectory.

This fixes two issues:

1. OCaml library directories differ between systems, and 'lib/ocaml' is
incorrect e.g. on amd64 Gentoo where OCaml is installed
in 'lib64/ocaml'. Therefore, obtain the library path from the OCaml
compiler using 'ocamlc -where' (which is already used to set
OCAML_STDLIB_PATH), which is the method used commonly in OCaml packages.

2. 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 new layout is used commonly by other OCaml
packages, and findlib is able to find the LLVM libraries successfully.

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

Differential Revision: https://reviews.llvm.org/D24354

llvm-svn: 282895
2016-09-30 18:34:23 +00:00
..
CMakeLists.txt cmake: Install the OCaml libraries into a more correct path 2016-09-30 18:34:23 +00:00
llvm_ocaml.c [OCaml] Add functions for accessing metadata nodes. 2016-06-22 03:30:24 +00:00
llvm.ml [OCaml] Add functions for accessing metadata nodes. 2016-06-22 03:30:24 +00:00
llvm.mli [OCaml] Add functions for accessing metadata nodes. 2016-06-22 03:30:24 +00:00
META.llvm.in cmake: Install the OCaml libraries into a more correct path 2016-09-30 18:34:23 +00:00