This is an archive of the discontinued LLVM Phabricator instance.

[OCaml] fix tests in the CMake static library codepath
AbandonedPublic

Authored by artagnon on Dec 29 2014, 4:46 PM.

Details

Summary

OCaml bindings built statically with CMake are good for nothing, as
shown by the test failures. Make two changes to make tests pass:

  1. Fix AddOCaml CMake rule to link in the case of static lib.
  2. Add the LIBDIR variable required by lit.cfg.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>

Diff Detail

Event Timeline

artagnon updated this revision to Diff 17700.Dec 29 2014, 4:46 PM
artagnon retitled this revision from to [OCaml] fix tests in the CMake static library codepath.
artagnon updated this object.
artagnon edited the test plan for this revision. (Show Details)
artagnon added reviewers: whitequark, rafael.
artagnon added a subscriber: Unknown Object (MLST).
whitequark requested changes to this revision.Dec 29 2014, 6:48 PM
whitequark edited edge metadata.
whitequark added inline comments.
CMakeLists.txt
150

I don't like how you add a non-namespaced variable, especially since another one with the identical value exists.

cmake/modules/AddOCaml.cmake
55

-ldopt is supposed to provide the path to the LLVM shared libraries to the ld command that links the OCaml stub shared library. It is simply not necessary for static linking.

147

I don't see why this change is needed.

195

I don't see why this change is needed.

This revision now requires changes to proceed.Dec 29 2014, 6:48 PM

Refactored to be non-invasive and committed in rL224977 and rL224978.

artagnon abandoned this revision.Dec 29 2014, 7:39 PM