Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix x.py doc --stage 1 src/tools/error_index_generator #84776

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/bootstrap/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,16 @@ impl ErrorIndex {
// use new syntax, but it should work otherwise.)
let compiler = builder.compiler(builder.top_stage.saturating_sub(1), builder.config.build);
let mut cmd = Command::new(builder.ensure(ErrorIndex { compiler }));
// because rustdoc depends on rustc_driver, error_index transitively depends on libLLVM.so.
// by default libLLVM is only copied in the assemble stage, so copy it explicitly here.
// NOTE: this does *not* use `builder.sysroot(compiler)` because that gives `stage0-sysroot/` for the stage0 compiler,
// but we want `stage0/` to be consistent with the dynamic load path.
let rustc_libdir = builder.rustc_libdir(compiler);
let sysroot = rustc_libdir.parent().unwrap();
crate::dist::maybe_install_llvm_runtime(builder, compiler.host, &sysroot);

add_dylib_path(
vec![PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host))],
vec![builder.sysroot_libdir(compiler, compiler.host).to_path_buf(), rustc_libdir],
&mut cmd,
);
cmd
Expand Down