configure: Don't sync unused submodules

If the compiler is built with --{llvm,jemalloc,libuv}-root, then the configure
script can skip updating these submodules.

Closes #14822
This commit is contained in:
Alex Crichton 2014-06-11 18:54:14 -07:00
parent 9b9ef44233
commit 49fe690477
1 changed files with 19 additions and 2 deletions

21
configure vendored
View File

@ -942,8 +942,25 @@ then
msg "git: submodule sync"
"${CFG_GIT}" submodule sync
msg "git: submodule init"
"${CFG_GIT}" submodule init
# Disable submodules that we're not using
if [ ! -z "${CFG_LLVM_ROOT}" ]; then
msg "git: submodule deinit src/llvm"
"${CFG_GIT}" submodule deinit src/llvm
fi
if [ ! -z "${CFG_JEMALLOC_ROOT}" ]; then
msg "git: submodule deinit src/jemalloc"
"${CFG_GIT}" submodule deinit src/jemalloc
fi
if [ ! -z "${CFG_LIBUV_ROOT}" ]; then
msg "git: submodule deinit src/libuv"
"${CFG_GIT}" submodule deinit src/libuv
fi
msg "git: submodule update"
"${CFG_GIT}" submodule update --init
"${CFG_GIT}" submodule update
need_ok "git failed"
msg "git: submodule foreach sync"
@ -951,7 +968,7 @@ then
need_ok "git failed"
msg "git: submodule foreach update"
"${CFG_GIT}" submodule update --init --recursive
"${CFG_GIT}" submodule update --recursive
need_ok "git failed"
# NB: this is just for the sake of getting the submodule SHA1 values