Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ impl SplitDebuginfo {
} else if target.contains("windows") {
SplitDebuginfo::Packed
} else {
SplitDebuginfo::Off
SplitDebuginfo::Unpacked
}
}
}
Expand Down Expand Up @@ -887,11 +887,13 @@ impl Config {
// We still support running outside the repository if we find we aren't in a git directory.
cmd.arg("rev-parse").arg("--show-toplevel");
// Discard stderr because we expect this to fail when building from a tarball.
let output = cmd
.stderr(std::process::Stdio::null())
.output()
.ok()
.and_then(|output| if output.status.success() { Some(output) } else { None });
let output = cmd.stderr(std::process::Stdio::null()).output().ok().and_then(|output| {
if output.status.success() {
Some(output)
} else {
None
}
});
if let Some(output) = output {
let git_root = String::from_utf8(output.stdout).unwrap();
// We need to canonicalize this path to make sure it uses backslashes instead of forward slashes.
Expand Down