about summary refs log tree commit diff
path: root/src/bootstrap/lib.rs
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-07-05 10:48:02 -0600
committerMark Simulacrum <mark.simulacrum@gmail.com>2017-07-20 11:23:58 -0600
commit1a844ebb8f8f3ec2fed09a23597207d35ae1a28e (patch)
treeac468499a893bd53a5efca7ada49216c12679e0e /src/bootstrap/lib.rs
parent60388303c770a6e9409f3afa75d31d9125f871e3 (diff)
downloadrust-1a844ebb8f8f3ec2fed09a23597207d35ae1a28e.tar.gz
rust-1a844ebb8f8f3ec2fed09a23597207d35ae1a28e.zip
Move tool_cmd to tool.rs
Diffstat (limited to 'src/bootstrap/lib.rs')
-rw-r--r--src/bootstrap/lib.rs39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index b58b46eb8f2..c1e42c67128 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -549,45 +549,6 @@ impl Build {
         rustdoc
     }
 
-    /// Get a `Command` which is ready to run `tool` in `stage` built for
-    /// `host`.
-    fn tool_cmd(&self, compiler: Compiler, tool: &str) -> Command {
-        let mut cmd = Command::new(self.tool(compiler, tool));
-        self.prepare_tool_cmd(compiler, &mut cmd);
-        cmd
-    }
-
-    /// Prepares the `cmd` provided to be able to run the `compiler` provided.
-    ///
-    /// Notably this munges the dynamic library lookup path to point to the
-    /// right location to run `compiler`.
-    fn prepare_tool_cmd(&self, compiler: Compiler, cmd: &mut Command) {
-        let host = compiler.host;
-        let mut paths = vec![
-            self.sysroot_libdir(compiler, compiler.host),
-            self.cargo_out(compiler, Mode::Tool, host).join("deps"),
-        ];
-
-        // On MSVC a tool may invoke a C compiler (e.g. compiletest in run-make
-        // mode) and that C compiler may need some extra PATH modification. Do
-        // so here.
-        if compiler.host.contains("msvc") {
-            let curpaths = env::var_os("PATH").unwrap_or(OsString::new());
-            let curpaths = env::split_paths(&curpaths).collect::<Vec<_>>();
-            for &(ref k, ref v) in self.cc[compiler.host].0.env() {
-                if k != "PATH" {
-                    continue
-                }
-                for path in env::split_paths(v) {
-                    if !curpaths.contains(&path) {
-                        paths.push(path);
-                    }
-                }
-            }
-        }
-        add_lib_path(paths, cmd);
-    }
-
     /// Get the space-separated set of activated features for the standard
     /// library.
     fn std_features(&self) -> String {