mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Auto merge of #31620 - alexcrichton:fix-out-of-tree-builds, r=brson
This removes creating some extraneous directories and also fixes some submodule management with out of tree builds. Closes #31619
This commit is contained in:
commit
df128bdc4c
36
configure
vendored
36
configure
vendored
@ -1327,27 +1327,29 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
step_msg "making directories"
|
||||
if [ -z "$CFG_ENABLE_RUSTBUILD" ]; then
|
||||
|
||||
for i in \
|
||||
step_msg "making directories"
|
||||
|
||||
for i in \
|
||||
doc doc/std doc/extra \
|
||||
dl tmp dist
|
||||
do
|
||||
do
|
||||
make_dir $i
|
||||
done
|
||||
done
|
||||
|
||||
for t in $CFG_HOST
|
||||
do
|
||||
for t in $CFG_HOST
|
||||
do
|
||||
make_dir $t/llvm
|
||||
done
|
||||
done
|
||||
|
||||
for t in $CFG_HOST
|
||||
do
|
||||
for t in $CFG_HOST
|
||||
do
|
||||
make_dir $t/rustllvm
|
||||
done
|
||||
done
|
||||
|
||||
for t in $CFG_TARGET
|
||||
do
|
||||
for t in $CFG_TARGET
|
||||
do
|
||||
make_dir $t/rt
|
||||
for s in 0 1 2 3
|
||||
do
|
||||
@ -1361,10 +1363,10 @@ do
|
||||
make_dir $t/rt/stage$s/$i
|
||||
done
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
for h in $CFG_HOST
|
||||
do
|
||||
for h in $CFG_HOST
|
||||
do
|
||||
for t in $CFG_TARGET
|
||||
do
|
||||
# host bin dir stage0
|
||||
@ -1417,7 +1419,9 @@ do
|
||||
make_dir $h/test/codegen
|
||||
make_dir $h/test/codegen-units
|
||||
make_dir $h/test/rustdoc
|
||||
done
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
# Configure submodules
|
||||
step_msg "configuring submodules"
|
||||
|
@ -160,23 +160,24 @@ impl Build {
|
||||
if fs::metadata(self.src.join(".git")).is_err() {
|
||||
return
|
||||
}
|
||||
let out = output(Command::new("git").arg("submodule").arg("status"));
|
||||
let git_submodule = || {
|
||||
let mut cmd = Command::new("git");
|
||||
cmd.current_dir(&self.src).arg("submodule");
|
||||
return cmd
|
||||
};
|
||||
let out = output(git_submodule().arg("status"));
|
||||
if !out.lines().any(|l| l.starts_with("+") || l.starts_with("-")) {
|
||||
return
|
||||
}
|
||||
|
||||
self.run(Command::new("git").arg("submodule").arg("sync"));
|
||||
self.run(Command::new("git").arg("submodule").arg("init"));
|
||||
self.run(Command::new("git").arg("submodule").arg("update"));
|
||||
self.run(Command::new("git").arg("submodule").arg("update")
|
||||
.arg("--recursive"));
|
||||
self.run(Command::new("git").arg("submodule").arg("status")
|
||||
.arg("--recursive"));
|
||||
self.run(Command::new("git").arg("submodule").arg("foreach")
|
||||
.arg("--recursive")
|
||||
self.run(git_submodule().arg("sync"));
|
||||
self.run(git_submodule().arg("init"));
|
||||
self.run(git_submodule().arg("update"));
|
||||
self.run(git_submodule().arg("update").arg("--recursive"));
|
||||
self.run(git_submodule().arg("status").arg("--recursive"));
|
||||
self.run(git_submodule().arg("foreach").arg("--recursive")
|
||||
.arg("git").arg("clean").arg("-fdx"));
|
||||
self.run(Command::new("git").arg("submodule").arg("foreach")
|
||||
.arg("--recursive")
|
||||
self.run(git_submodule().arg("foreach").arg("--recursive")
|
||||
.arg("git").arg("checkout").arg("."));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user