Skip to content

Commit 3872bdc

Browse files
committed
Support -t commands -s
1 parent 0b171c6 commit 3872bdc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

simd/ninja-simd.cpp

+9-1
Original file line numberDiff line numberDiff line change
@@ -2064,11 +2064,19 @@ int main(int argc, char** argv) {
20642064
monitor_subprocesses(state, *global);
20652065
dbg("done\n");
20662066
} else if (tool == "commands") {
2067+
bool single = false;
20672068
for (auto target : targets) {
2069+
if (target == "-s") {
2070+
single = true;
2071+
continue;
2072+
}
20682073
Node* n = global->nodes[target];
20692074
if (!n)
20702075
error("unknown target");
2071-
print_commands(n);
2076+
if (!single)
2077+
print_commands(n);
2078+
else if (n->in_edge)
2079+
print_command(n->in_edge);
20722080
}
20732081
} else if (tool == "loadlog") {
20742082
} else {

0 commit comments

Comments
 (0)