mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
fbcode_builder: getdeps: add build options
Summary: The build options class contains some environmental and build related information that will be passed down to fetcher and builder objects that will be introduced in later diffs. Reviewed By: simpkins Differential Revision: D14691007 fbshipit-source-id: e8fe7322f590667ac28a5a3925a072056df0b3e3
This commit is contained in:
committed by
Facebook Github Bot
parent
bd620998c4
commit
bf022a1adf
@@ -46,7 +46,29 @@ class ShowHostType(SubCmd):
|
||||
|
||||
|
||||
def build_argparser():
|
||||
ap = argparse.ArgumentParser(description="Get and build dependencies and projects")
|
||||
common_args = argparse.ArgumentParser(add_help=False)
|
||||
common_args.add_argument(
|
||||
"--scratch-path", help="Where to maintain checkouts and build dirs"
|
||||
)
|
||||
common_args.add_argument(
|
||||
"--install-prefix",
|
||||
help=(
|
||||
"Where the final build products will be installed "
|
||||
"(default is [scratch-path]/installed)"
|
||||
),
|
||||
)
|
||||
common_args.add_argument(
|
||||
"--num-jobs",
|
||||
type=int,
|
||||
help=(
|
||||
"Number of concurrent jobs to use while building. "
|
||||
"(default=number of cpu cores)"
|
||||
),
|
||||
)
|
||||
|
||||
ap = argparse.ArgumentParser(
|
||||
description="Get and build dependencies and projects", parents=[common_args]
|
||||
)
|
||||
sub = ap.add_subparsers(
|
||||
# metavar suppresses the long and ugly default list of subcommands on a
|
||||
# single line. We still render the nicer list below where we would
|
||||
@@ -56,7 +78,7 @@ def build_argparser():
|
||||
help="",
|
||||
)
|
||||
|
||||
add_subcommands(sub)
|
||||
add_subcommands(sub, common_args)
|
||||
|
||||
return ap
|
||||
|
||||
|
Reference in New Issue
Block a user