Skip to content

Stop build if one executable() target fails #11962

Closed Answered by eli-schwartz
Phil67ago asked this question in Q&A
Discussion options

You must be logged in to vote

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 with ninja -j1 but it's not obvious that that's better than just failing as soon as one target fails to build.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Phil67ago
Comment options

@Phil67ago
Comment options

@eli-schwartz
Comment options

Answer selected by Phil67ago
@Phil67ago
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants