Do not track the sysroot.

As suggested by @alexcrichton, the sysroot only loads libraries that
are themselves tracked.
This commit is contained in:
Joel Galenson 2019-08-13 09:12:06 -07:00
parent e9e45c59a7
commit 692c0bf4ff

View file

@ -396,7 +396,6 @@ top_level_options!(
search_paths: Vec<SearchPath> [UNTRACKED],
libs: Vec<(String, Option<String>, Option<cstore::NativeLibraryKind>)> [TRACKED],
maybe_sysroot: Option<PathBuf> [UNTRACKED],
maybe_sysroot_remapped: Option<PathBuf> [TRACKED],
target_triple: TargetTriple [TRACKED],
@ -611,7 +610,6 @@ impl Default for Options {
output_types: OutputTypes(BTreeMap::new()),
search_paths: vec![],
maybe_sysroot: None,
maybe_sysroot_remapped: None,
target_triple: TargetTriple::from_triple(host_triple()),
test: false,
incremental: None,
@ -2455,7 +2453,7 @@ pub fn build_session_options_and_crate_config(
let crate_name = matches.opt_str("crate-name");
let remap_path_prefix: Vec<(PathBuf, PathBuf)> = matches
let remap_path_prefix = matches
.opt_strs("remap-path-prefix")
.into_iter()
.map(|remap| {
@ -2472,10 +2470,6 @@ pub fn build_session_options_and_crate_config(
})
.collect();
let sysroot_remapped_opt = sysroot_opt
.clone()
.map(|sysroot| FilePathMapping::new(remap_path_prefix.clone()).map_prefix(sysroot).0);
(
Options {
crate_types,
@ -2487,7 +2481,6 @@ pub fn build_session_options_and_crate_config(
output_types: OutputTypes(output_types),
search_paths,
maybe_sysroot: sysroot_opt,
maybe_sysroot_remapped: sysroot_remapped_opt,
target_triple,
test,
incremental,