Skip to content

Conversation

@emersion
Copy link
Contributor

Using ocamlbuild speeds up the builds a lot by using a build cache. This mirrors Lem's build scripts.

The old behaviour can be restored with the USE_OCAMLBUILD variable.

@stephenrkell
Copy link
Contributor

Anything to speed up the build is good. :-)

I have a personal dislike for ocamlbuild (and other language-specific build tools), and at times in the past we have wanted to move away from them. In this case it looks like a very simple and benign usage. So I will happily merge this for now.

For future reference, can you point me somewhere that documents what caching ocamlbuild is doing? If it's a feature of the compiler, and if it can be exploited simply enough from a makefile, we might find doing that to be preferable (or not).

@stephenrkell stephenrkell merged commit d5e89d1 into rems-project:master Apr 23, 2018
@emersion emersion deleted the ocamlbuild branch April 23, 2018 15:02
@emersion
Copy link
Contributor Author

For future reference, can you point me somewhere that documents what caching ocamlbuild is doing? If it's a feature of the compiler, and if it can be exploited simply enough from a makefile, we might find doing that to be preferable (or not).

I don't think it's a feature of the OCaml compiler, I think it's implemented in ocamlbuild directly. I haven't found a solid reference, but the user manual says one feature of ocamlbuild is a "cache mechanism avoiding unnecessary compilations where reasonably computable".

I have a personal dislike for ocamlbuild (and other language-specific build tools), and at times in the past we have wanted to move away from them. In this case it looks like a very simple and benign usage. So I will happily merge this for now.

Currently the Makefile using ocamlfind instead of ocamlbuild is building all ML files at once, it should be possible to build them one by one and use make's "caching" mechanism.

PeterSewell pushed a commit that referenced this pull request Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants