Skip to content

Commit ab0092e

Browse files
Run the error index tool against the sysroot libdir
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.
1 parent 942b384 commit ab0092e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bootstrap/tool.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub fn prepare_tool_cargo(
275275

276276
macro_rules! tool {
277277
($($name:ident, $path:expr, $tool_name:expr, $mode:expr $(,llvm_tools = $llvm:expr)*;)+) => {
278-
#[derive(Copy, Clone)]
278+
#[derive(Copy, PartialEq, Eq, Clone)]
279279
pub enum Tool {
280280
$(
281281
$name,
@@ -640,7 +640,7 @@ impl<'a> Builder<'a> {
640640
fn prepare_tool_cmd(&self, compiler: Compiler, tool: Tool, cmd: &mut Command) {
641641
let host = &compiler.host;
642642
let mut lib_paths: Vec<PathBuf> = vec![
643-
if compiler.stage == 0 {
643+
if compiler.stage == 0 && tool != Tool::ErrorIndex {
644644
self.build.rustc_snapshot_libdir()
645645
} else {
646646
PathBuf::from(&self.sysroot_libdir(compiler, compiler.host))

0 commit comments

Comments
 (0)