diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-11-22 15:49:48 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-12-12 10:36:15 +1100 |
| commit | 2640da7d13a1051dddcf93c06f9ae90508fce6fb (patch) | |
| tree | d0cec63297afc90780020789f4fb654cf21d47ab /src/librustc_codegen_ssa | |
| parent | 0238bcc60d943878244ef7221d338f13a35e2a45 (diff) | |
| download | rust-2640da7d13a1051dddcf93c06f9ae90508fce6fb.tar.gz rust-2640da7d13a1051dddcf93c06f9ae90508fce6fb.zip | |
Remove `Session::sysroot()`.
Instead of maybe storing its own sysroot and maybe deferring to the one in `Session::opts`, just clone the latter when necessary so one is always directly available. This removes the need for the getter.
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/back/linker.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/back/linker.rs b/src/librustc_codegen_ssa/back/linker.rs index 2f92c427f65..4960c8922b9 100644 --- a/src/librustc_codegen_ssa/back/linker.rs +++ b/src/librustc_codegen_ssa/back/linker.rs @@ -606,8 +606,7 @@ impl<'a> Linker for MsvcLinker<'a> { self.cmd.arg("/DEBUG"); // This will cause the Microsoft linker to embed .natvis info into the PDB file - let sysroot = self.sess.sysroot(); - let natvis_dir_path = sysroot.join("lib\\rustlib\\etc"); + let natvis_dir_path = self.sess.sysroot.join("lib\\rustlib\\etc"); if let Ok(natvis_dir) = fs::read_dir(&natvis_dir_path) { // LLVM 5.0.0's lld-link frontend doesn't yet recognize, and chokes // on, the /NATVIS:... flags. LLVM 6 (or earlier) should at worst ignore |
