bazel-contrib / bazel-contrib/rules_foreign_cc
Parallel build support
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
This might be a big ask; and may be a bazel core project issue; but when consuming larger projects that need to be `configure/make`'d (e.g. OpenSSL, postgres, hdf5...) it would be great to be able to use parallel builds.
Of course, pragmatically one might override `make_commands` to have `make -j12` in it...but that has disastrous consequences with other parallel builds (not in the least also on machines with fewer than 12 cores...)
In the land of gumdrops and unicorns, one could imagine `bazel` being able to trick out `make` by passing it the same magic that `$(MAKE)` or `+make` does in a real makefile, along with a `-j` set from the `--jobs` setting. That way, the `make` process will play nicely with the bazel build.
I realise this is a big ask: but if one doesn't ask, then maybe it won't happen! Any ideas on improving this in general also welcomed!
Thanks all!
Contributor guide
Research direction
The issue names no files or tests; begin by tracing the configure/make integration and its make_commands override, then inspect how Bazel's --jobs setting is exposed. Done would mean foreign make builds share Bazel's parallelism without a fixed job count or disrupting other parallel builds.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100