]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #55343 - Keruspe:remap-debuginfo-release, r=alexcrichton
authorkennytm <kennytm@gmail.com>
Fri, 26 Oct 2018 10:25:10 +0000 (18:25 +0800)
committerkennytm <kennytm@gmail.com>
Fri, 26 Oct 2018 15:06:41 +0000 (23:06 +0800)
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

src/bootstrap/lib.rs

index 4e26c98a627597c158de18f952d82ed6a8a229e6..ab3d0b51370f142dfdd4e73615bd63c96e158b56 100644 (file)
@@ -765,7 +765,7 @@ fn debuginfo_map(&self, which: GitRepo) -> Option<String> {
 
         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"),