Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make's -j option isn't forwarded to ocamlbuild #5

Closed
adrien-n opened this issue Nov 11, 2016 · 1 comment
Closed

make's -j option isn't forwarded to ocamlbuild #5

adrien-n opened this issue Nov 11, 2016 · 1 comment

Comments

@adrien-n
Copy link
Contributor

The C stubs currently take quite a bit of time to build and actually dominate the build. Ocamlbuild can also build them in parallel. However "make -jX" will not invoke ocamlbuild with "-j X", preventing the parallel builds.

The simplest way to have parallel builds is to invoke make with the 'OCAMLBUILD="ocamlbuild -j 4"' argument to override the value that has been detected by configure. Obviously this negates the usefulness of the configure check.

I have however no idea on how to implement that in a particularly clean way so maybe adding something in the documentation about the aforementioned argument would be the best solution for the time being.

@axiles
Copy link
Owner

axiles commented Nov 15, 2016

Now the Makefile passes the variable OCAMLBUILD_FLAGS to ocamlbuild

It possible to have the parallel build by either specifying the variable at configuration time:

./configure  OCAMLBUILD_FLAGS="-j 4"
make

or you can also overrided it during the build

OCAMLBUILD_FLAGS="-j 4" make

Information about OCAMLBUILD_FLAGS can be obtained by entering:

./configure --help

@axiles axiles closed this as completed Nov 22, 2016
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

No branches or pull requests

2 participants