diff options
| author | bors <bors@rust-lang.org> | 2014-09-10 14:20:37 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-09-10 14:20:37 +0000 |
| commit | 6faa4f33a42de32579e02a8d030db920d360e2b5 (patch) | |
| tree | 5d7371fbe1c017d478613f46c6f7477d94d89271 | |
| parent | 4049a4da794197e802f680d3c3a0b9ae4a69ccf5 (diff) | |
| parent | ba43f7bc8c81e595182abdf1698f0a19187c11b5 (diff) | |
| download | rust-6faa4f33a42de32579e02a8d030db920d360e2b5.tar.gz rust-6faa4f33a42de32579e02a8d030db920d360e2b5.zip | |
auto merge of #17129 : epdtry/rust/misc/llvm-root-reconfig, r=brson
Currently `./configure --llvm-root=...` and similar flags will break incremental builds by forcing reconfiguration on every `make`. This happens because `reconfig.mk` incorrectly treats submodules in the `-` (uninitialized) state as requiring reconfiguration, and `./configure` deliberately deinitializes unneeded submodules. The fix is to reconfigure only when submodules are in the `+` state (wrong commit checked out).
| -rw-r--r-- | mk/reconfig.mk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/reconfig.mk b/mk/reconfig.mk index 8b88fee0ad3..fc8237d32bb 100644 --- a/mk/reconfig.mk +++ b/mk/reconfig.mk @@ -15,7 +15,11 @@ rwildcard=$(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \ ifndef CFG_DISABLE_MANAGE_SUBMODULES # This is a pretty expensive operation but I don't see any way to avoid it -NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^\(+\|-\)') +# NB: This only looks for '+' status (wrong commit checked out), not '-' status +# (nothing checked out at all). `./configure --{llvm,jemalloc,libuv}-root` +# will explicitly deinitialize the corresponding submodules, and we don't +# want to force constant rebuilds in that case. +NEED_GIT_RECONFIG=$(shell cd "$(CFG_SRC_DIR)" && "$(CFG_GIT)" submodule status | grep -c '^+') else NEED_GIT_RECONFIG=0 endif |
