0

I want to compile a large set of different bazel targets lets say [A, B, C, D] and understand which are broken. I have notice that if I launch: bazel build A bazel build B bazel build C bazel build D

It takes a lot of time, not because of compilation time, but because of bazel setup time.

Is there an alternative solution for making this compilation process faster, but still having the ability to understand which targets are broken and which not?

Thanks.

1 Answer 1

0

You can do

bazel build --keep_going A B C D 

Then bazel won't stop at the first broken target, and will try to build as much as it can.

That said, if the various targets don't share a lot of the same dependencies, I wouldn't expect a huge difference, since bazel should still be caching between different invocations. Also, if you're changing build flags between invocations, then bazel may have to rerun the analysis phase (this is what I assume you mean by 'bazel setup time'). And if you need different build flags for the different targets, then you might not be able to build them all in one invocation.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.