From bc5a139baa928b8a440e9053a3d7e0d4cc932f98 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 18:56:12 -0500
Subject: [PATCH] rustdoc: avoid supplying a bad default sysroot so the
 librustc code can calculate it properly

---
 src/librustdoc/core.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 21242e6f1e4..b040a4bfd2a 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -18,7 +18,6 @@ use rustc_trans::back::link;
 use syntax::{ast, ast_map, codemap, diagnostic};
 
 use std::cell::RefCell;
-use std::os;
 use std::collections::{HashMap, HashSet};
 use arena::TypedArena;
 
@@ -89,7 +88,7 @@ pub fn run_core(libs: Vec<Path>, cfgs: Vec<String>, externs: Externs,
     let warning_lint = lint::builtin::WARNINGS.name_lower();
 
     let sessopts = config::Options {
-        maybe_sysroot: Some(os::self_exe_path().unwrap().dir_path()),
+        maybe_sysroot: None,
         addl_lib_search_paths: RefCell::new(libs),
         crate_types: vec!(config::CrateTypeRlib),
         lint_opts: vec!((warning_lint, lint::Allow)),