[OCaml] Avoid embedding absolute paths into executables.
[oota-llvm.git] / test / lit.cfg
index 67c9bbae744e59a69d1c699d3932c07234f86dde..82f6fdc4706cb0d699ee8491b728d34094151327 100644 (file)
@@ -201,7 +201,8 @@ config.substitutions.append( ('%ocamlc',
     "%s ocamlc %s" % (config.ocamlfind_executable, config.ocaml_flags)) )
 if config.have_ocamlopt in ('1', 'TRUE'):
     config.substitutions.append( ('%ocamlopt',
-        "%s ocamlopt %s" % (config.ocamlfind_executable, config.ocaml_flags)) )
+        "%s ocamlopt -cclib -L%s -cclib -Wl,-rpath,%s %s" %
+            (config.ocamlfind_executable, llvm_lib_dir, llvm_lib_dir, config.ocaml_flags)) )
 else:
     config.substitutions.append( ('%ocamlopt', "true" ) )