annotate llvm/bindings/ocaml/README.txt @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 79ff65ed7e25
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 This directory contains LLVM bindings for the OCaml programming language
anatofuz
parents:
diff changeset
2 (http://ocaml.org).
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 Prerequisites
anatofuz
parents:
diff changeset
5 -------------
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 * OCaml 4.00.0+.
anatofuz
parents:
diff changeset
8 * ctypes 0.4+.
anatofuz
parents:
diff changeset
9 * oUnit 2+ (only required for tests).
anatofuz
parents:
diff changeset
10 * CMake (to build LLVM).
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 Building the bindings
anatofuz
parents:
diff changeset
13 ---------------------
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 If all dependencies are present, the bindings will be built and installed
anatofuz
parents:
diff changeset
16 as a part of the default CMake configuration, with no further action.
anatofuz
parents:
diff changeset
17 They will only work with the specific OCaml compiler detected during the build.
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 The bindings can also be built out-of-tree, i.e. targeting a preinstalled
anatofuz
parents:
diff changeset
20 LLVM. To do this, configure the LLVM build tree as follows:
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 $ cmake -DLLVM_OCAML_OUT_OF_TREE=TRUE \
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
23 -DCMAKE_INSTALL_PREFIX=[Preinstalled LLVM path] \
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
24 -DLLVM_OCAML_INSTALL_PATH=[OCaml install prefix] \
150
anatofuz
parents:
diff changeset
25 [... any other options]
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 then build and install it as:
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 $ make ocaml_all
anatofuz
parents:
diff changeset
30 $ cmake -P bindings/ocaml/cmake_install.cmake