rems-project / linksem

Semantic model for aspects of ELF static linking and DWARF debug information
Other
43 stars 7 forks source link

Use ocamlbuild by default #2

Closed emersion closed 6 years ago

emersion commented 6 years ago

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 commented 6 years ago

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).

emersion commented 6 years ago

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.