Skip to content

configure: Don't sync unused submodules #14834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
21 changes: 19 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -940,16 +940,33 @@ 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"
"${CFG_GIT}" submodule foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
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
Expand Down