llvm-mirror/bindings/ocaml/llvm/META.llvm.in
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

111 lines
3.0 KiB
Plaintext

name = "llvm"
version = "@PACKAGE_VERSION@"
description = "LLVM OCaml bindings"
archive(byte) = "llvm.cma"
archive(native) = "llvm.cmxa"
directory = "llvm"
package "analysis" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Intermediate representation analysis for LLVM"
archive(byte) = "llvm_analysis.cma"
archive(native) = "llvm_analysis.cmxa"
)
package "bitreader" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Bitcode reader for LLVM"
archive(byte) = "llvm_bitreader.cma"
archive(native) = "llvm_bitreader.cmxa"
)
package "bitwriter" (
requires = "llvm,unix"
version = "@PACKAGE_VERSION@"
description = "Bitcode writer for LLVM"
archive(byte) = "llvm_bitwriter.cma"
archive(native) = "llvm_bitwriter.cmxa"
)
package "executionengine" (
requires = "llvm,llvm.target,ctypes.foreign"
version = "@PACKAGE_VERSION@"
description = "JIT and Interpreter for LLVM"
archive(byte) = "llvm_executionengine.cma"
archive(native) = "llvm_executionengine.cmxa"
)
package "ipo" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "IPO Transforms for LLVM"
archive(byte) = "llvm_ipo.cma"
archive(native) = "llvm_ipo.cmxa"
)
package "irreader" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "IR assembly reader for LLVM"
archive(byte) = "llvm_irreader.cma"
archive(native) = "llvm_irreader.cmxa"
)
package "scalar_opts" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Scalar Transforms for LLVM"
archive(byte) = "llvm_scalar_opts.cma"
archive(native) = "llvm_scalar_opts.cmxa"
)
package "transform_utils" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Transform utilities for LLVM"
archive(byte) = "llvm_transform_utils.cma"
archive(native) = "llvm_transform_utils.cmxa"
)
package "vectorize" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Vector Transforms for LLVM"
archive(byte) = "llvm_vectorize.cma"
archive(native) = "llvm_vectorize.cmxa"
)
package "passmgr_builder" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Pass Manager Builder for LLVM"
archive(byte) = "llvm_passmgr_builder.cma"
archive(native) = "llvm_passmgr_builder.cmxa"
)
package "target" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Target Information for LLVM"
archive(byte) = "llvm_target.cma"
archive(native) = "llvm_target.cmxa"
)
package "linker" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "Intermediate Representation Linker for LLVM"
archive(byte) = "llvm_linker.cma"
archive(native) = "llvm_linker.cmxa"
)
package "all_backends" (
requires = "llvm"
version = "@PACKAGE_VERSION@"
description = "All backends for LLVM"
archive(byte) = "llvm_all_backends.cma"
archive(native) = "llvm_all_backends.cmxa"
)