MCPcopy Create free account
hub / github.com/nodejs/node / add_common_args

Function add_common_args

deps/v8/tools/gcmole/gcmole.py:597–684  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

595 default_clang_bin_dir = default_gcmole_dir / 'gcmole-tools/bin'
596
597 def add_common_args(parser):
598 archs = list(ARCHITECTURES.keys())
599 parser.add_argument(
600 "--v8-root-dir",
601 metavar="DIR",
602 default=default_root_dir,
603 help="V8 checkout directory. Default: '{}'".format(
604 default_root_dir.absolute()))
605 parser.add_argument(
606 "--v8-target-cpu",
607 default="x64",
608 choices=archs,
609 help="Tested CPU architecture. Choices: {}".format(archs),
610 metavar="CPU")
611 parser.add_argument(
612 "--clang-bin-dir",
613 metavar="DIR",
614 help="Build dir of the custom clang version for gcmole." + \
615 "Default: env['CLANG_DIR'] or '{}'".format(default_clang_bin_dir))
616 parser.add_argument(
617 "--clang-plugins-dir",
618 metavar="DIR",
619 help="Containing dir for libgcmole.so."
620 "Default: env['CLANG_PLUGINS'] or '{}'".format(default_gcmole_dir))
621 parser.add_argument(
622 "--v8-build-dir",
623 metavar="BUILD_DIR",
624 help="GN build dir for v8. Default: 'out/CPU.Release'. "
625 "Config must match cpu specified by --v8-target-cpu")
626 parser.add_argument(
627 "--out-dir",
628 metavar="DIR",
629 help="Output location for the gcsuspect and gcauses file."
630 "Default: BUILD_DIR/gen/tools/gcmole")
631 parser.add_argument(
632 "--is-bot",
633 action="store_true",
634 default=False,
635 help="Flag for setting build bot specific settings.")
636 parser.add_argument(
637 "--shard-count",
638 default=1,
639 type=int,
640 help="Number of tasks the current action (e.g. collect or check) "
641 "is distributed to.")
642 parser.add_argument(
643 "--shard-index",
644 default=0,
645 type=int,
646 help="Index of the current task (in [0..shard-count-1]) if the "
647 "overall action is distributed (shard-count > 1).")
648
649 group = parser.add_argument_group("GCMOLE options")
650 group.add_argument(
651 "--sequential",
652 action="store_true",
653 default=False,
654 help="Don't use parallel python runner.")

Callers 1

mainFunction · 0.85

Calls 4

keysMethod · 0.65
formatMethod · 0.65
listFunction · 0.50
add_argumentMethod · 0.45

Tested by

no test coverage detected