@@ -624,20 +624,6 @@ impl Build {
624
624
/// If any submodule has been initialized already, sync it unconditionally.
625
625
/// This avoids contributors checking in a submodule change by accident.
626
626
pub fn maybe_update_submodules ( & self ) {
627
- // WARNING: keep this in sync with the submodules hard-coded in bootstrap.py
628
- let mut bootstrap_submodules: Vec < & str > = vec ! [
629
- "src/tools/rust-installer" ,
630
- "src/tools/cargo" ,
631
- "src/tools/rls" ,
632
- "src/tools/miri" ,
633
- "library/backtrace" ,
634
- "library/stdarch" ,
635
- ] ;
636
- // As in bootstrap.py, we include `rust-analyzer` if `build.vendor` was set in
637
- // `config.toml`.
638
- if self . config . vendor {
639
- bootstrap_submodules. push ( "src/tools/rust-analyzer" ) ;
640
- }
641
627
// Avoid running git when there isn't a git checkout.
642
628
if !self . config . submodules ( & self . rust_info ) {
643
629
return ;
@@ -653,10 +639,8 @@ impl Build {
653
639
// Look for `submodule.$name.path = $path`
654
640
// Sample output: `submodule.src/rust-installer.path src/tools/rust-installer`
655
641
let submodule = Path :: new ( line. splitn ( 2 , ' ' ) . nth ( 1 ) . unwrap ( ) ) ;
656
- // avoid updating submodules twice
657
- if !bootstrap_submodules. iter ( ) . any ( |& p| Path :: new ( p) == submodule)
658
- && channel:: GitInfo :: new ( false , submodule) . is_git ( )
659
- {
642
+ // Don't update the submodule unless it's already been cloned.
643
+ if channel:: GitInfo :: new ( false , submodule) . is_git ( ) {
660
644
self . update_submodule ( submodule) ;
661
645
}
662
646
}
0 commit comments