host = next(x for x in version.split('\n') if x.startswith("host: "))
triple = host.split("host: ")[1]
if verbose:
- print("detected default triple {}".format(triple))
+ print("detected default triple {} from pre-installed rustc".format(triple))
return triple
except Exception as e:
if verbose:
- print("rustup not detected: {}".format(e))
+ print("pre-installed rustc not detected: {}".format(e))
print("falling back to auto-detect")
required = sys.platform != 'win32'
err = "unknown OS type: {}".format(ostype)
sys.exit(err)
- if cputype == 'powerpc' and ostype == 'unknown-freebsd':
+ if cputype in ['powerpc', 'riscv'] and ostype == 'unknown-freebsd':
cputype = subprocess.check_output(
['uname', '-p']).strip().decode(default_encoding)
cputype_mapper = {
status = subprocess.call(["git", "diff-index", "--quiet", commit, "--", compiler, library])
if status != 0:
if download_rustc == "if-unchanged":
+ if self.verbose:
+ print("warning: saw changes to compiler/ or library/ since {}; " \
+ "ignoring `download-rustc`".format(commit))
return None
- print("warning: `download-rustc` is enabled, but there are changes to \
- compiler/ or library/")
+ print("warning: `download-rustc` is enabled, but there are changes to " \
+ "compiler/ or library/")
if self.verbose:
- print("using downloaded stage1 artifacts from CI (commit {})".format(commit))
+ print("using downloaded stage2 artifacts from CI (commit {})".format(commit))
self.rustc_commit = commit
# FIXME: support downloading artifacts from the beta channel
self.download_toolchain(False, "nightly")
def build_bootstrap(self):
"""Build bootstrap"""
+ print("Building rustbuild")
build_dir = os.path.join(self.build_dir, "bootstrap")
if self.clean and os.path.exists(build_dir):
shutil.rmtree(build_dir)
recorded_submodules[data[3]] = data[2]
for module in filtered_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_dist_environment(self, url):
"""Set download URL for normal environment"""