File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ impl RustwideBuilder {
130
130
//
131
131
// Removing it beforehand works fine, and prevents rustup from blocking the update later in
132
132
// 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.
133
136
for target in installed_targets {
134
137
if !targets_to_install. remove ( & target) {
135
138
self . toolchain . remove_target ( & self . workspace , & target) ?;
@@ -453,6 +456,11 @@ impl RustwideBuilder {
453
456
}
454
457
let mut cargo_args = vec ! [ "doc" . to_owned( ) , "--lib" . to_owned( ) , "--no-deps" . to_owned( ) ] ;
455
458
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
+ }
456
464
cargo_args. push ( "--target" . to_owned ( ) ) ;
457
465
cargo_args. push ( target. to_owned ( ) ) ;
458
466
} ;
You can’t perform that action at this time.
0 commit comments