Skip to content

Conversation

boomanaiden154
Copy link
Contributor

The nested ninja invocations currently confuse the script. Update the script to handle this correctly and a test to ensure we do not regress this behavior in the future.

The nested ninja invocations currently confuse the script. Update  the
script to handle this correctly and a test to ensure we do not regress
this behavior in the future.
Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming I understood correctly, LGTM. Just needs a comment in the test case.

# ninja invocations. The sub-ninja will print that a subcommand failed,
# and then the outer ninja will list the command that failed. We should
# ignore the outer failure.
if ninja_log[index - 1].startswith("ninja: build stopped:"):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was going to say why not check that the two commands are the same for a bit more certainty that you're in this specific situation, but they won't be, right?

The outer ninja's command will be something like "move to runtimes directory and invoke ninja" and the inner one is "build this runtime source file".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, exactly. The inner ninja will fail on whatever actually failed and the outer ninja will fail on the invoking the inner ninja.

@boomanaiden154 boomanaiden154 enabled auto-merge (squash) August 28, 2025 14:21
@boomanaiden154 boomanaiden154 merged commit a317d64 into llvm:main Aug 28, 2025
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants