@@ -565,15 +565,14 @@ def update_submodules(self):
565565 submodules = [s .split ()[1 ] for s in subprocess .check_output (
566566 ["git" , "config" , "--file" , os .path .join (
567567 self .rust_root , ".gitmodules" ), "--get-regexp" , "path" ]).splitlines ()]
568- for module in submodules :
569- if module .endswith (b"llvm" ) and \
570- (self .get_toml ('llvm-config' ) or self .get_mk ('CFG_LLVM_ROOT' )):
571- continue
572- if module .endswith (b"jemalloc" ) and \
573- (self .get_toml ('jemalloc' ) or self .get_mk ('CFG_JEMALLOC_ROOT' )):
574- continue
575- run (["git" , "submodule" , "update" ,
576- "--init" , module ], cwd = self .rust_root )
568+ submodules = [module for module in submodules
569+ if not ((module .endswith (b"llvm" ) and
570+ (self .get_toml ('llvm-config' ) or self .get_mk ('CFG_LLVM_ROOT' ))) or
571+ (module .endswith (b"jemalloc" ) and
572+ (self .get_toml ('jemalloc' ) or self .get_mk ('CFG_JEMALLOC_ROOT' ))))
573+ ]
574+ run (["git" , "submodule" , "update" ,
575+ "--init" ] + submodules , cwd = self .rust_root )
577576 run (["git" , "submodule" , "-q" , "foreach" , "git" ,
578577 "reset" , "-q" , "--hard" ], cwd = self .rust_root )
579578 run (["git" , "submodule" , "-q" , "foreach" , "git" ,
0 commit comments