Skip to content

Commit 7707578

Browse files
committed
Do not try to distribute lldb if it was not built
1 parent 4aa21d1 commit 7707578

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/bootstrap/dist.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -1992,6 +1992,17 @@ impl Step for Lldb {
19921992
fn run(self, builder: &Builder) -> Option<PathBuf> {
19931993
let target = self.target;
19941994

1995+
// Do nothing if lldb was not built. This is difficult to
1996+
// determine in should_run because the target is not available
1997+
// at that point.
1998+
let bindir = builder
1999+
.llvm_out(target)
2000+
.join("bin");
2001+
let lldb_exe = bindir.join(exe("lldb", &target));
2002+
if !lldb_exe.exists() {
2003+
return None;
2004+
}
2005+
19952006
builder.info(&format!("Dist Lldb ({})", target));
19962007
let src = builder.src.join("src/lldb");
19972008
let name = pkgname(builder, "lldb");
@@ -2001,9 +2012,6 @@ impl Step for Lldb {
20012012
drop(fs::remove_dir_all(&image));
20022013

20032014
// Prepare the image directory
2004-
let bindir = builder
2005-
.llvm_out(target)
2006-
.join("bin");
20072015
let dst = image.join("bin");
20082016
t!(fs::create_dir_all(&dst));
20092017
for program in &["lldb", "lldb-argdumper", "lldb-mi", "lldb-server"] {

0 commit comments

Comments
 (0)