forked from mirrors/gecko-dev
Bug 1690712 - Allow --enable-bootstrap in all configurations. r=firefox-build-system-reviewers,mhentges
And make it prioritize the bootstrap directory over system paths. Differential Revision: https://phabricator.services.mozilla.com/D103981
This commit is contained in:
parent
faaf1bbc04
commit
571f8f5c17
1 changed files with 18 additions and 12 deletions
|
|
@ -208,12 +208,27 @@ def moz_fetches_dir(value):
|
|||
return value[0]
|
||||
|
||||
|
||||
@depends(developer_options, moz_fetches_dir)
|
||||
def bootstrap_search_path_order(developer_options, moz_fetches_dir):
|
||||
option(
|
||||
"--enable-bootstrap",
|
||||
nargs="?",
|
||||
choices=("install", "update"),
|
||||
help="Automatically update/bootstrap some toolchains when they are present but out of date",
|
||||
)
|
||||
|
||||
|
||||
@depends(developer_options, "--enable-bootstrap", moz_fetches_dir)
|
||||
def bootstrap_search_path_order(developer_options, bootstrap, moz_fetches_dir):
|
||||
if moz_fetches_dir:
|
||||
log.debug("Prioritizing MOZ_FETCHES_DIR in toolchain path.")
|
||||
return "prepend"
|
||||
|
||||
if bootstrap:
|
||||
log.debug(
|
||||
"Prioritizing mozbuild state dir in toolchain paths because "
|
||||
"bootstrap mode is enabled."
|
||||
)
|
||||
return "prepend"
|
||||
|
||||
if developer_options:
|
||||
log.debug(
|
||||
"Prioritizing mozbuild state dir in toolchain paths because "
|
||||
|
|
@ -239,16 +254,7 @@ def original_path():
|
|||
return environ["PATH"].split(os.pathsep)
|
||||
|
||||
|
||||
option(
|
||||
"--enable-bootstrap",
|
||||
nargs="?",
|
||||
choices=("install", "update"),
|
||||
when=developer_options,
|
||||
help="Automatically update/bootstrap some toolchains when they are present but out of date",
|
||||
)
|
||||
|
||||
|
||||
@depends("--enable-bootstrap", when=developer_options)
|
||||
@depends("--enable-bootstrap")
|
||||
def bootstrap(value):
|
||||
if value:
|
||||
# value here is either an empty tuple, or a tuple containing either
|
||||
|
|
|
|||
Loading…
Reference in a new issue