File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ impl RustwideBuilder {
130130 //
131131 // Removing it beforehand works fine, and prevents rustup from blocking the update later in
132132 // the method.
133+ //
134+ // Note that this means that non tier-one targets will be uninstalled on every update,
135+ // and will not be reinstalled until explicitly requested by a crate.
133136 for target in installed_targets {
134137 if !targets_to_install. remove ( & target) {
135138 self . toolchain . remove_target ( & self . workspace , & target) ?;
@@ -453,6 +456,11 @@ impl RustwideBuilder {
453456 }
454457 let mut cargo_args = vec ! [ "doc" . to_owned( ) , "--lib" . to_owned( ) , "--no-deps" . to_owned( ) ] ;
455458 if target != HOST_TARGET {
459+ // If the explicit target is not a tier one target, we need to install it.
460+ if !TARGETS . contains ( & target) {
461+ // This is a no-op if the target is already installed.
462+ self . toolchain . add_target ( & self . workspace , target) ?;
463+ }
456464 cargo_args. push ( "--target" . to_owned ( ) ) ;
457465 cargo_args. push ( target. to_owned ( ) ) ;
458466 } ;
You can’t perform that action at this time.
0 commit comments