summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/AddOCaml.cmake
Commit message (Collapse)AuthorAgeFilesLines
* [OCaml] Install .mli (interface) filesMichal Gorny2016-10-011-1/+2
| | | | | | | | | | | | | Install the OCaml interface .mli files. Those files were most likely omitted because they are input files for the compiled .cmi files. However, installing them is reasonable since -- unlike .cmi files -- they are human-readable. The issue was originally spotted by @jpdeplaix. Differential Revision: https://reviews.llvm.org/D25128 llvm-svn: 283028
* cmake: Install the OCaml libraries into a more correct pathMichal Gorny2016-09-301-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Move the ocaml_all target into the Misc folder for cleanliness; NFC.Aaron Ballman2016-09-091-0/+1
| | | | llvm-svn: 281061
* [CMake] [OCaml] Allow building OCaml bindings out of tree.Peter Zotov2016-09-051-3/+9
| | | | | | | | | That is, add build system support for building the OCaml bindings against preinstalled LLVM libraries. This is important for package managers such as OPAM, because OCaml libraries need to be built against a specific OCaml compiler installation. llvm-svn: 280642
* [build] Fixed build break for OCaml bindings.Artem Belevich2016-06-211-1/+7
| | | | | | | After r273302 LLVM_SYSTEM_LIBS may have entries that already have -l prefix and we need to deal with that. llvm-svn: 273333
* [cmake] [OCaml] Make ocamldoc targets depend on output filesPeter Zotov2015-06-071-1/+1
| | | | | | | | | | | | OCaml doc builds fail without .cmi files, and .cmi files are collected in ocaml_outputs. Therefore, make doc targets depend on ocaml_outputs as well. Fixes: https://llvm.org/bugs/show_bug.cgi?id=23777 Patch by Michał Górny <mgorny@gentoo.org> llvm-svn: 239259
* [OCaml] Use $CAMLORIGIN, an rpath-$ORIGIN-like mechanism in OCaml.Peter Zotov2015-01-131-0/+2
| | | | | | | | | | | | | | | As a result, installations of LLVM in non-standard locations will not require passing custom -ccopt -L flags when building the binary, nor absolute paths would be embedded in the cma/cmxa files. Additionally, the executables will not require changes to LD_LIBRARY_PATH, although CAML_LD_LIBRARY_PATH still has to be set for ocamlc without -custom. See http://caml.inria.fr/mantis/view.php?id=6642. Note that the patch is approved, but not merged yet. It will be released in 4.03 and likely 4.02. llvm-svn: 225778
* [OCaml] [cmake] Use LLVM_LIBRARY_DIR instead of LLVM_LIBRARY_OUTPUT_INTDIR.Peter Zotov2014-12-301-3/+3
| | | | | | | | The latter variable is internal. Original patch by Ramkumar Ramachandra <artagnon@gmail.com> llvm-svn: 224977
* [OCaml] [cmake] Add CMake buildsystem for OCaml.Peter Zotov2014-12-011-0/+199
Closes PR15325. llvm-svn: 223071
OpenPOWER on IntegriCloud