- for module in submodules:
- if module.endswith(b"llvm") and \
- (self.get_toml('llvm-config') or self.get_mk('CFG_LLVM_ROOT')):
- continue
- if module.endswith(b"jemalloc") and \
- (self.get_toml('jemalloc') or self.get_mk('CFG_JEMALLOC_ROOT')):
- continue
- run(["git", "submodule", "update",
- "--init", module], cwd=self.rust_root)
+ submodules = [module for module in submodules
+ if not ((module.endswith(b"llvm") and
+ (self.get_toml('llvm-config') or self.get_mk('CFG_LLVM_ROOT'))) or
+ (module.endswith(b"jemalloc") and
+ (self.get_toml('jemalloc') or self.get_mk('CFG_JEMALLOC_ROOT'))))
+ ]
+ run(["git", "submodule", "update",
+ "--init"] + submodules, cwd=self.rust_root)