driver: implement post-target run argv semantics

This commit is contained in:
2026-08-23 17:33:31 +09:00
parent 0b24b11d65
commit 29122f2a48
6 changed files with 579 additions and 17 deletions

View File

@@ -7849,14 +7849,11 @@ parse_build_flags(const char *cmd, int argc, char **argv,
return -1;
} else if (*src_out == NULL) {
*src_out = argv[i];
/* Go's FlagSet stops at the first positional. For build,
* everything after it is package-request input, even "--". */
if (strcmp(cmd, "build") == 0) {
i++;
break;
}
} else {
break; /* leave remaining argv to caller (run-args) */
/* Go's FlagSet stops at the first positional. Build leaves
* the suffix as package-request input; run passes it verbatim
* to the selected program, including flag-like operands. */
i++;
break;
}
}
return i;