File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -273,11 +273,12 @@ impl Config {
273
273
274
274
let mut tar = tar:: Archive :: new ( decompressor) ;
275
275
276
+ let is_ci_rustc = dst. ends_with ( "ci-rustc" ) ;
277
+
276
278
// `compile::Sysroot` needs to know the contents of the `rustc-dev` tarball to avoid adding
277
279
// it to the sysroot unless it was explicitly requested. But parsing the 100 MB tarball is slow.
278
280
// Cache the entries when we extract it so we only have to read it once.
279
- let mut recorded_entries =
280
- if dst. ends_with ( "ci-rustc" ) { recorded_entries ( dst, pattern) } else { None } ;
281
+ let mut recorded_entries = if is_ci_rustc { recorded_entries ( dst, pattern) } else { None } ;
281
282
282
283
for member in t ! ( tar. entries( ) ) {
283
284
let mut member = t ! ( member) ;
@@ -287,10 +288,12 @@ impl Config {
287
288
continue ;
288
289
}
289
290
let mut short_path = t ! ( original_path. strip_prefix( directory_prefix) ) ;
290
- if !short_path. starts_with ( pattern) {
291
+ let is_builder_config = short_path. to_str ( ) == Some ( "builder-config" ) ;
292
+
293
+ if !short_path. starts_with ( pattern) && ( is_ci_rustc && !is_builder_config) {
291
294
continue ;
292
295
}
293
- short_path = t ! ( short_path. strip_prefix( pattern) ) ;
296
+ short_path = short_path. strip_prefix ( pattern) . unwrap_or ( short_path ) ;
294
297
let dst_path = dst. join ( short_path) ;
295
298
self . verbose ( || {
296
299
println ! ( "extracting {} to {}" , original_path. display( ) , dst. display( ) )
You can’t perform that action at this time.
0 commit comments