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