From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 6 May 2021 20:14:58 +0200 Subject: [PATCH] bootstrap: Change libexec dir --- src/bootstrap/dist.rs | 4 ++-- src/bootstrap/tool.rs | 2 +- .../crates/rust-analyzer/src/cli/load_cargo.rs | 2 +- src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs | 6 ++---- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs index 12585e80e6b7..eb596be98dca 100644 --- a/src/bootstrap/dist.rs +++ b/src/bootstrap/dist.rs @@ -394,7 +394,7 @@ fn prepare_image(builder: &Builder<'_>, compiler: Compiler, image: &Path) { target: compiler.host, }) .expect("rust-analyzer-proc-macro-server always builds"); - builder.install(&ra_proc_macro_srv, &image.join("libexec"), 0o755); + builder.install(&ra_proc_macro_srv, &image.join("lib"), 0o755); let libdir_relative = builder.libdir_relative(compiler); @@ -1003,7 +1003,7 @@ fn run(self, builder: &Builder<'_>) -> Option { for dirent in fs::read_dir(cargo.parent().unwrap()).expect("read_dir") { let dirent = dirent.expect("read dir entry"); if dirent.file_name().to_str().expect("utf8").starts_with("cargo-credential-") { - tarball.add_file(&dirent.path(), "libexec", 0o755); + tarball.add_file(&dirent.path(), "lib", 0o755); } } diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index eec74b2675a1..4bf1d7348e43 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -781,7 +781,7 @@ fn run(self, builder: &Builder<'_>) -> Option { // Copy `rust-analyzer-proc-macro-srv` to `/libexec/` // so that r-a can use it. - let libexec_path = builder.sysroot(self.compiler).join("libexec"); + let libexec_path = builder.sysroot(self.compiler).join("lib"); t!(fs::create_dir_all(&libexec_path)); builder.copy(&path, &libexec_path.join("rust-analyzer-proc-macro-srv")); diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs index 5dba545b8718..befaeb9e70db 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/load_cargo.rs @@ -69,7 +69,7 @@ pub fn load_workspace( if let Some(sysroot) = sysroot.as_ref() { let standalone_server_name = format!("rust-analyzer-proc-macro-srv{}", std::env::consts::EXE_SUFFIX); - let server_path = sysroot.root().join("libexec").join(&standalone_server_name); + let server_path = sysroot.root().join("lib").join(&standalone_server_name); if std::fs::metadata(&server_path).is_ok() { path = server_path; args = vec![]; diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs index e1f651786dee..77d6efca231e 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/reload.rs @@ -322,10 +322,8 @@ fn eq_ignore_build_data<'a>( | ProjectWorkspace::Json { sysroot, .. } = ws { if let Some(sysroot) = sysroot.as_ref() { - let server_path = sysroot - .root() - .join("libexec") - .join(&standalone_server_name); + let server_path = + sysroot.root().join("lib").join(&standalone_server_name); if std::fs::metadata(&server_path).is_ok() { tracing::debug!( "Sysroot proc-macro server exists at {}",