Skip to content

Commit 692c0bf

Browse files
committed
Do not track the sysroot.
As suggested by @alexcrichton, the sysroot only loads libraries that are themselves tracked.
1 parent e9e45c5 commit 692c0bf

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/librustc/session/config.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ top_level_options!(
396396
search_paths: Vec<SearchPath> [UNTRACKED],
397397
libs: Vec<(String, Option<String>, Option<cstore::NativeLibraryKind>)> [TRACKED],
398398
maybe_sysroot: Option<PathBuf> [UNTRACKED],
399-
maybe_sysroot_remapped: Option<PathBuf> [TRACKED],
400399

401400
target_triple: TargetTriple [TRACKED],
402401

@@ -611,7 +610,6 @@ impl Default for Options {
611610
output_types: OutputTypes(BTreeMap::new()),
612611
search_paths: vec![],
613612
maybe_sysroot: None,
614-
maybe_sysroot_remapped: None,
615613
target_triple: TargetTriple::from_triple(host_triple()),
616614
test: false,
617615
incremental: None,
@@ -2455,7 +2453,7 @@ pub fn build_session_options_and_crate_config(
24552453

24562454
let crate_name = matches.opt_str("crate-name");
24572455

2458-
let remap_path_prefix: Vec<(PathBuf, PathBuf)> = matches
2456+
let remap_path_prefix = matches
24592457
.opt_strs("remap-path-prefix")
24602458
.into_iter()
24612459
.map(|remap| {
@@ -2472,10 +2470,6 @@ pub fn build_session_options_and_crate_config(
24722470
})
24732471
.collect();
24742472

2475-
let sysroot_remapped_opt = sysroot_opt
2476-
.clone()
2477-
.map(|sysroot| FilePathMapping::new(remap_path_prefix.clone()).map_prefix(sysroot).0);
2478-
24792473
(
24802474
Options {
24812475
crate_types,
@@ -2487,7 +2481,6 @@ pub fn build_session_options_and_crate_config(
24872481
output_types: OutputTypes(output_types),
24882482
search_paths,
24892483
maybe_sysroot: sysroot_opt,
2490-
maybe_sysroot_remapped: sysroot_remapped_opt,
24912484
target_triple,
24922485
test,
24932486
incremental,

0 commit comments

Comments
 (0)