[llvm] r225787 - [OCaml] Allow out-of-tree builds of LLVM bindings.

Peter Zotov whitequark at whitequark.org
Tue Jan 13 04:17:56 PST 2015

Author: whitequark
Date: Tue Jan 13 06:17:56 2015
New Revision: 225787

URL: http://llvm.org/viewvc/llvm-project?rev=225787&view=rev
[OCaml] Allow out-of-tree builds of LLVM bindings.

In order to use this feature, configure LLVM as usual,
but then build and install it as:

   make all install SYSTEM_LLVM_CONFIG=llvm-config

where llvm-config is the llvm-config binary installed on your
system (possibly llvm-config-VERSION on e.g. Debian).


Modified: llvm/trunk/bindings/ocaml/Makefile.ocaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/bindings/ocaml/Makefile.ocaml?rev=225787&r1=225786&r2=225787&view=diff
--- llvm/trunk/bindings/ocaml/Makefile.ocaml (original)
+++ llvm/trunk/bindings/ocaml/Makefile.ocaml Tue Jan 13 06:17:56 2015
@@ -32,6 +32,12 @@ endif
 include $(LEVEL)/Makefile.common
+# Used in out-of-tree builds of OCaml bindings only.
+LLVMLibsOptions += $(shell $(LLVM_CONFIG) --ldflags)
 # Intentionally ignore PROJ_prefix here. We want the ocaml stdlib. However, the
 # user can override this with OCAML_LIBDIR or configure --with-ocaml-libdir=.
 PROJ_libocamldir := $(DESTDIR)$(OCAML_LIBDIR)
@@ -261,8 +267,9 @@ uninstall-shared::
-##===- Deposit dependent libraries adjacent to Ocaml libs -----------------===##
+##===- Deposit dependent libraries adjacent to OCaml libs -----------------===##
 all-local:: build-deplibs
 clean-local:: clean-deplibs
 install-local:: install-deplibs
@@ -287,7 +294,7 @@ install-deplibs:
 	$(Verb) $(RM) -f $(DestLibs)
 ##===- Build ocaml interfaces (.mli's -> .cmi's) --------------------------===##

More information about the llvm-commits mailing list