[OCaml] Embed rpath into stub libraries and native executables
authorPeter Zotov <whitequark@whitequark.org>
Wed, 27 Nov 2013 11:03:18 +0000 (11:03 +0000)
committerPeter Zotov <whitequark@whitequark.org>
Wed, 27 Nov 2013 11:03:18 +0000 (11:03 +0000)
commit4e05282ec5b757ecfd43cfb71e6ea3ab01cf7cd7
tree3cabaa3f67d6cdfbe75132372cfd74233a0af467
parent3b818b481fef58aabbd70a6ce8cce859e0c10aaf
[OCaml] Embed rpath into stub libraries and native executables

This commit embeds a set of linker flags with hardcoded paths to
the LLVM shared library on --enable-shared builds into .cmxa files
and stub dynamic libraries. This solution closely follows existing
rules for rpath in the LLVM tools, which had to be modified because
of differences in toolchain.

Without this patch, OCaml tests as well as opam bindings broke,
as neither of those updates LD_LIBRARY_PATH to include
the $prefix/lib directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195834 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/ocaml/Makefile.ocaml