@@ -175,15 +175,25 @@ impl Context {
175
175
176
176
// Quickly produce gzip compressed artifacts that are needed for successful manifest
177
177
// building.
178
- let recompress = [
179
- self . dl_dir ( )
180
- . join ( "rust-nightly-x86_64-unknown-linux-gnu.tar.xz" ) ,
181
- self . dl_dir ( )
182
- . join ( "cargo-nightly-x86_64-unknown-linux-gnu.tar.xz" ) ,
183
- ] ;
184
- recompress. par_iter ( ) . try_for_each ( |tarball| {
185
- recompress:: recompress_file ( tarball, false , flate2:: Compression :: fast ( ) , false )
186
- } ) ?;
178
+ //
179
+ // Nightly (1.71+) supports this upstream without the extra recompression, see
180
+ // https://github.com/rust-lang/rust/pull/110436.
181
+ if self . config . channel != Channel :: Nightly {
182
+ let version = match self . config . channel {
183
+ Channel :: Stable => self . current_version . as_deref ( ) . unwrap ( ) ,
184
+ Channel :: Beta => "beta" ,
185
+ Channel :: Nightly => "nightly" ,
186
+ } ;
187
+ let recompress = [
188
+ self . dl_dir ( )
189
+ . join ( format ! ( "rust-{}-x86_64-unknown-linux-gnu.tar.xz" , version) ) ,
190
+ self . dl_dir ( )
191
+ . join ( format ! ( "cargo-{}-x86_64-unknown-linux-gnu.tar.xz" , version) ) ,
192
+ ] ;
193
+ recompress. par_iter ( ) . try_for_each ( |tarball| {
194
+ recompress:: recompress_file ( tarball, false , flate2:: Compression :: fast ( ) , false )
195
+ } ) ?;
196
+ }
187
197
188
198
// Ok we've now determined that a release needs to be done.
189
199
0 commit comments