Rollup merge of #63953 - crlf0710:bootstrap_mirroring, r=Mark-Simulacrum
bootstrap: allow specifying mirror for bootstrap compiler download.
This commit is contained in:
commit
78e728e2c2
1 changed files with 14 additions and 2 deletions
|
@ -320,7 +320,7 @@ class RustBuild(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.cargo_channel = ''
|
self.cargo_channel = ''
|
||||||
self.date = ''
|
self.date = ''
|
||||||
self._download_url = 'https://static.rust-lang.org'
|
self._download_url = ''
|
||||||
self.rustc_channel = ''
|
self.rustc_channel = ''
|
||||||
self.build = ''
|
self.build = ''
|
||||||
self.build_dir = os.path.join(os.getcwd(), "build")
|
self.build_dir = os.path.join(os.getcwd(), "build")
|
||||||
|
@ -733,8 +733,18 @@ class RustBuild(object):
|
||||||
self.update_submodule(module[0], module[1], recorded_submodules)
|
self.update_submodule(module[0], module[1], recorded_submodules)
|
||||||
print("Submodules updated in %.2f seconds" % (time() - start_time))
|
print("Submodules updated in %.2f seconds" % (time() - start_time))
|
||||||
|
|
||||||
|
def set_normal_environment(self):
|
||||||
|
"""Set download URL for normal environment"""
|
||||||
|
if 'RUSTUP_DIST_SERVER' in os.environ:
|
||||||
|
self._download_url = os.environ['RUSTUP_DIST_SERVER']
|
||||||
|
else:
|
||||||
|
self._download_url = 'https://static.rust-lang.org'
|
||||||
|
|
||||||
def set_dev_environment(self):
|
def set_dev_environment(self):
|
||||||
"""Set download URL for development environment"""
|
"""Set download URL for development environment"""
|
||||||
|
if 'RUSTUP_DEV_DIST_SERVER' in os.environ:
|
||||||
|
self._download_url = os.environ['RUSTUP_DEV_DIST_SERVER']
|
||||||
|
else:
|
||||||
self._download_url = 'https://dev-static.rust-lang.org'
|
self._download_url = 'https://dev-static.rust-lang.org'
|
||||||
|
|
||||||
def check_vendored_status(self):
|
def check_vendored_status(self):
|
||||||
|
@ -828,6 +838,8 @@ def bootstrap(help_triggered):
|
||||||
|
|
||||||
if 'dev' in data:
|
if 'dev' in data:
|
||||||
build.set_dev_environment()
|
build.set_dev_environment()
|
||||||
|
else:
|
||||||
|
build.set_normal_environment()
|
||||||
|
|
||||||
build.update_submodules()
|
build.update_submodules()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue