]> git.lizzy.rs Git - rust.git/commitdiff
Run the error index tool against the sysroot libdir
authorMark Rousskov <mark.simulacrum@gmail.com>
Sat, 21 Jul 2018 21:19:39 +0000 (15:19 -0600)
committerMark Rousskov <mark.simulacrum@gmail.com>
Sat, 21 Jul 2018 21:19:39 +0000 (15:19 -0600)
Previously when building the error index tool in stage 0 we would
attempt to use stage 0 libraries, but because it depends on rustdoc,
those don't exist: rustdoc is built against stage 1 libraries.

This patch aligns those two and passes the stage 1 libdir to the error
index.

src/bootstrap/tool.rs

index 42c65b750d33c42469a3c9438f5fecf18a0ecb67..0969e5abe07dcb52273ae0078e39a9f3c429944c 100644 (file)
@@ -275,7 +275,7 @@ pub fn prepare_tool_cargo(
 
 macro_rules! tool {
     ($($name:ident, $path:expr, $tool_name:expr, $mode:expr $(,llvm_tools = $llvm:expr)*;)+) => {
-        #[derive(Copy, Clone)]
+        #[derive(Copy, PartialEq, Eq, Clone)]
         pub enum Tool {
             $(
                 $name,
@@ -640,7 +640,7 @@ pub fn tool_cmd(&self, tool: Tool) -> Command {
     fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
         let host = &compiler.host;
         let mut lib_paths: Vec<PathBuf> = vec![
-            if compiler.stage == 0 {
+            if compiler.stage == 0 && tool != Tool::ErrorIndex {
                 self.build.rustc_snapshot_libdir()
             } else {
                 PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))