[PATCH] D119079: [llvm] [cmake] Fix finding modern ounit2

shiwei weng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 11:36:06 PST 2022


arbipher added a comment.

I see. Thanks for the explanation. I was opam-minded before and now the problem looks more clear to me.

I am ok with the patch.

The following is some of my understanding.

The library `ounit` now contains two packages:

- `ounit2` is the canonical one and its name on opam is `ounit2`.
- `oUnit` is for transition and its name on opam is `ounit`.

`ocamlfind/findlib` is a package-format tool and library.
`opam` is a package-distribution tool and repo. It's widely used in the ocaml community.
Packages can also be managed by other package managers, as shown in your Gentoo cases. It varies that how package managers are dealing with the name for `ounit2` in other linux distributions.
For this aspect, I don't have a better solution.

As for llvm's ocaml binding, I don't see how `ounit` is actually used. I don't find it in the source of the binding, nor in the test `llvm/test/Bindings/OCaml/`.
`llvm/test/Bindings/OCaml/lit.local.cfg` refers to `config.root.have_ocaml_ounit` but no further used in it. I can revisit this issue and make another PR after realizing its usage later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119079/new/

https://reviews.llvm.org/D119079



More information about the llvm-commits mailing list