Stop build if one executable() target fails #11962
-
In this test, A and B are built one after the other. |
Beta Was this translation helpful? Give feedback.
Answered by
eli-schwartz
Jul 10, 2023
Replies: 1 comment 4 replies
-
This should already be the case. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One thing that could be "wrong" is that ninja could have started building B first, or at the same time, so it was already built by the time A failed.
By default ninja builds in parallel, equivalent to
make -j$(nproc)
. You can force ninja to build only one thing at a time withninja -j1
but it's not obvious that that's better than just failing as soon as one target fails to build.