Update Cargo to fix nightly channel

This commit updates Cargo with rust-lang/cargo#3820 which includes a fix for
rust-lang/cargo#3819. At the same time this also slightly tweaks how rustbuild
builds cargo to ensure that all the build information (including git info and
such) makes its way into the binary.

Closes rust-lang/cargo#3820
This commit is contained in:
Alex Crichton
2017-03-11 18:46:31 -08:00
parent f88b24b34c
commit b5798a9be8
4 changed files with 21 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ matrix:
SRC=. SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache RUST_LOG=sccache=debug
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
install: &osx_install_sccache > install: &osx_install_sccache >
@@ -59,7 +59,7 @@ matrix:
SRC=. SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache RUST_LOG=sccache=debug
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
install: *osx_install_sccache install: *osx_install_sccache
@@ -71,7 +71,7 @@ matrix:
DEPLOY=1 DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache RUST_LOG=sccache=debug
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
install: > install: >
@@ -84,7 +84,7 @@ matrix:
DEPLOY=1 DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache RUST_LOG=sccache=debug
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
install: *osx_install_sccache install: *osx_install_sccache
@@ -101,7 +101,7 @@ matrix:
DEPLOY_ALT=1 DEPLOY_ALT=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1 RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache RUST_LOG=sccache=debug
os: osx os: osx
osx_image: xcode8.2 osx_image: xcode8.2
install: *osx_install_sccache install: *osx_install_sccache

2
cargo

Submodule cargo updated: 5f3b9c4c6a...4a3c0a63b0

View File

@@ -42,9 +42,22 @@ struct Info {
impl GitInfo { impl GitInfo {
pub fn new(dir: &Path) -> GitInfo { pub fn new(dir: &Path) -> GitInfo {
if !dir.join(".git").is_dir() { // See if this even begins to look like a git dir
if !dir.join(".git").exists() {
return GitInfo { inner: None } return GitInfo { inner: None }
} }
// Make sure git commands work
let out = Command::new("git")
.arg("rev-parse")
.current_dir(dir)
.output()
.expect("failed to spawn git");
if !out.status.success() {
return GitInfo { inner: None }
}
// Ok, let's scrape some info
let ver_date = output(Command::new("git").current_dir(dir) let ver_date = output(Command::new("git").current_dir(dir)
.arg("log").arg("-1") .arg("log").arg("-1")
.arg("--date=short") .arg("--date=short")

View File

@@ -232,7 +232,7 @@ impl Build {
None => false, None => false,
}; };
let rust_info = channel::GitInfo::new(&src); let rust_info = channel::GitInfo::new(&src);
let cargo_info = channel::GitInfo::new(&src.join("src/tools/cargo")); let cargo_info = channel::GitInfo::new(&src.join("cargo"));
Build { Build {
flags: flags, flags: flags,