about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2018-10-25 10:29:08 +0200
committerMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2018-10-25 10:31:44 +0200
commitbbc3cd43784b69beda25dc0f002514d656d853a2 (patch)
treef7f8a16ce260264052a05ede4ea4ceaef248d338 /src/bootstrap/lib.rs
parentf99911a4a0bead7dd1f9ef2f90442844434cc391 (diff)
downloadrust-bbc3cd43784b69beda25dc0f002514d656d853a2.tar.gz
rust-bbc3cd43784b69beda25dc0f002514d656d853a2.zip
rustbuild: fix remap-debuginfo when building a release
Fallback to the release number as we can't get the
git commit sha as we're not in a git repository.

Fixes #55341

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4e26c98a627..ab3d0b51370 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -765,7 +765,7 @@ impl Build {
 
         let path = match which {
             GitRepo::Rustc => {
-                let sha = self.rust_info.sha().expect("failed to find sha");
+                let sha = self.rust_sha().unwrap_or(channel::CFG_RELEASE_NUM);
                 format!("/rustc/{}", sha)
             }
             GitRepo::Llvm => format!("/rustc/llvm"),