| 216 | |
| 217 | |
| 218 | def add_v2_arguments(parser): |
| 219 | parser.add_argument("--format", type=int, choices=(1, 2), default=1, |
| 220 | help="wire format (2 is experimental and unadmitted)") |
| 221 | parser.add_argument("--registry", help="format2 image-bound expected registry JSON") |
| 222 | for flag, default, help_text in ( |
| 223 | ("max-output-bytes", 32 * 1024 * 1024, "combined stdout/stderr bytes per command"), |
| 224 | ("max-total-output-bytes", 512 * 1024 * 1024, "aggregate command stdout/stderr bytes"), |
| 225 | ("max-profile-bytes", 64 * 1024 * 1024, "bytes per raw input profile"), |
| 226 | ("max-total-profile-bytes", 512 * 1024 * 1024, "aggregate raw and separately converted bytes"), |
| 227 | ("max-profile-files", 4096, "raw entries including directories, markers and listing profile"), |
| 228 | ("conversion-timeout", 60, "seconds per tool command"), |
| 229 | ("reduction-timeout", 600, "seconds per strict parse or final pure reduction"), |
| 230 | ("max-map-bytes", 64 * 1024 * 1024, "combined producer wire bytes"), |
| 231 | ): |
| 232 | parser.add_argument("--" + flag, type=int, default=default, |
| 233 | help="format2: %s (default: %s)" % (help_text, default)) |
| 234 | parser.epilog = ((parser.epilog or "") + |
| 235 | " Format2 always retains bounded raw and diagnostic evidence; " |
| 236 | "--keep-raw only changes format1. Format2 supports the observed " |
| 237 | "LLVM 22.1.8 frontend text dialect and POSIX process groups.") |
| 238 | |
| 239 | |
| 240 | def main(): |