From 49fe69047776651114e014a8307c684fcb866efd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 11 Jun 2014 18:54:14 -0700 Subject: [PATCH] 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 --- configure | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fe29e488316..e5106f93d35 100755 --- a/configure +++ b/configure @@ -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