Skip to content

Commit ab6325a

Browse files
committed
bootstrap: remove rls implementation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent ac47dba commit ab6325a

File tree

8 files changed

+2
-61
lines changed

8 files changed

+2
-61
lines changed

src/bootstrap/src/core/build_steps/check.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InT
463463
tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
464464
tool_check_step!(Miri, "src/tools/miri", SourceType::InTree);
465465
tool_check_step!(CargoMiri, "src/tools/miri/cargo-miri", SourceType::InTree);
466-
tool_check_step!(Rls, "src/tools/rls", SourceType::InTree);
467466
tool_check_step!(Rustfmt, "src/tools/rustfmt", SourceType::InTree);
468467
tool_check_step!(MiroptTestTools, "src/tools/miropt-test-tools", SourceType::InTree);
469468

src/bootstrap/src/core/build_steps/clippy.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ lint_any!(
320320
OptDist, "src/tools/opt-dist", "opt-dist";
321321
RemoteTestClient, "src/tools/remote-test-client", "remote-test-client";
322322
RemoteTestServer, "src/tools/remote-test-server", "remote-test-server";
323-
Rls, "src/tools/rls", "rls";
324323
RustAnalyzer, "src/tools/rust-analyzer", "rust-analyzer";
325324
Rustdoc, "src/tools/rustdoc", "clippy";
326325
Rustfmt, "src/tools/rustfmt", "rustfmt";

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,48 +1134,6 @@ impl Step for Cargo {
11341134
}
11351135
}
11361136

1137-
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
1138-
pub struct Rls {
1139-
pub compiler: Compiler,
1140-
pub target: TargetSelection,
1141-
}
1142-
1143-
impl Step for Rls {
1144-
type Output = Option<GeneratedTarball>;
1145-
const ONLY_HOSTS: bool = true;
1146-
const DEFAULT: bool = true;
1147-
1148-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1149-
let default = should_build_extended_tool(run.builder, "rls");
1150-
run.alias("rls").default_condition(default)
1151-
}
1152-
1153-
fn make_run(run: RunConfig<'_>) {
1154-
run.builder.ensure(Rls {
1155-
compiler: run.builder.compiler_for(
1156-
run.builder.top_stage,
1157-
run.builder.config.build,
1158-
run.target,
1159-
),
1160-
target: run.target,
1161-
});
1162-
}
1163-
1164-
fn run(self, builder: &Builder<'_>) -> Option<GeneratedTarball> {
1165-
let compiler = self.compiler;
1166-
let target = self.target;
1167-
1168-
let rls = builder.ensure(tool::Rls { compiler, target, extra_features: Vec::new() });
1169-
1170-
let mut tarball = Tarball::new(builder, "rls", &target.triple);
1171-
tarball.set_overlay(OverlayKind::Rls);
1172-
tarball.is_preview(true);
1173-
tarball.add_file(rls, "bin", 0o755);
1174-
tarball.add_legal_and_readme_to("share/doc/rls");
1175-
Some(tarball.generate())
1176-
}
1177-
}
1178-
11791137
#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
11801138
pub struct RustAnalyzer {
11811139
pub compiler: Compiler,
@@ -1518,7 +1476,6 @@ impl Step for Extended {
15181476
add_component!("rust-json-docs" => JsonDocs { host: target });
15191477
add_component!("cargo" => Cargo { compiler, target });
15201478
add_component!("rustfmt" => Rustfmt { compiler, target });
1521-
add_component!("rls" => Rls { compiler, target });
15221479
add_component!("rust-analyzer" => RustAnalyzer { compiler, target });
15231480
add_component!("llvm-components" => LlvmTools { target });
15241481
add_component!("clippy" => Clippy { compiler, target });

src/bootstrap/src/core/build_steps/setup.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ impl FromStr for Profile {
9898
"lib" | "library" => Ok(Profile::Library),
9999
"compiler" => Ok(Profile::Compiler),
100100
"maintainer" | "dist" | "user" => Ok(Profile::Dist),
101-
"tools" | "tool" | "rustdoc" | "clippy" | "miri" | "rustfmt" | "rls" => {
102-
Ok(Profile::Tools)
103-
}
101+
"tools" | "tool" | "rustdoc" | "clippy" | "miri" | "rustfmt" => Ok(Profile::Tools),
104102
"none" => Ok(Profile::None),
105103
"llvm" | "codegen" => Err("the \"llvm\" and \"codegen\" profiles have been removed,\
106104
use \"compiler\" instead which has the same functionality"

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ pub fn prepare_tool_cargo(
153153
let mut features = extra_features.to_vec();
154154
if builder.build.config.cargo_native_static {
155155
if path.ends_with("cargo")
156-
|| path.ends_with("rls")
157156
|| path.ends_with("clippy")
158157
|| path.ends_with("miri")
159158
|| path.ends_with("rustfmt")
@@ -960,10 +959,6 @@ tool_extended!((self, builder),
960959
Clippy, "src/tools/clippy", "clippy-driver", stable=true, add_bins_to_sysroot = ["clippy-driver", "cargo-clippy"];
961960
Miri, "src/tools/miri", "miri", stable=false, add_bins_to_sysroot = ["miri"];
962961
CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=true, add_bins_to_sysroot = ["cargo-miri"];
963-
// FIXME: tool_std is not quite right, we shouldn't allow nightly features.
964-
// But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
965-
// and this is close enough for now.
966-
Rls, "src/tools/rls", "rls", stable=true, tool_std=true;
967962
Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, add_bins_to_sysroot = ["rustfmt", "cargo-fmt"];
968963
);
969964

src/bootstrap/src/core/builder.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,6 @@ impl<'a> Builder<'a> {
733733
tool::RemoteTestClient,
734734
tool::RustInstaller,
735735
tool::Cargo,
736-
tool::Rls,
737736
tool::RustAnalyzer,
738737
tool::RustAnalyzerProcMacroSrv,
739738
tool::Rustdoc,
@@ -771,7 +770,6 @@ impl<'a> Builder<'a> {
771770
clippy::OptDist,
772771
clippy::RemoteTestClient,
773772
clippy::RemoteTestServer,
774-
clippy::Rls,
775773
clippy::RustAnalyzer,
776774
clippy::Rustdoc,
777775
clippy::Rustfmt,
@@ -787,7 +785,6 @@ impl<'a> Builder<'a> {
787785
check::Miri,
788786
check::CargoMiri,
789787
check::MiroptTestTools,
790-
check::Rls,
791788
check::Rustfmt,
792789
check::RustAnalyzer,
793790
check::Bootstrap,
@@ -897,7 +894,6 @@ impl<'a> Builder<'a> {
897894
dist::Analysis,
898895
dist::Src,
899896
dist::Cargo,
900-
dist::Rls,
901897
dist::RustAnalyzer,
902898
dist::Rustfmt,
903899
dist::Clippy,

src/bootstrap/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ pub enum Mode {
265265
/// Build a tool which uses the locally built rustc and the target std,
266266
/// placing the output in the "stageN-tools" directory. This is used for
267267
/// anything that needs a fully functional rustc, such as rustdoc, clippy,
268-
/// cargo, rls, rustfmt, miri, etc.
268+
/// cargo, rustfmt, miri, etc.
269269
ToolRustc,
270270
}
271271

src/bootstrap/src/utils/tarball.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub(crate) enum OverlayKind {
2323
Clippy,
2424
Miri,
2525
Rustfmt,
26-
Rls,
2726
RustAnalyzer,
2827
RustcCodegenCranelift,
2928
LlvmBitcodeLinker,
@@ -57,7 +56,6 @@ impl OverlayKind {
5756
"src/tools/rustfmt/LICENSE-APACHE",
5857
"src/tools/rustfmt/LICENSE-MIT",
5958
],
60-
OverlayKind::Rls => &["src/tools/rls/README.md", "LICENSE-APACHE", "LICENSE-MIT"],
6159
OverlayKind::RustAnalyzer => &[
6260
"src/tools/rust-analyzer/README.md",
6361
"src/tools/rust-analyzer/LICENSE-APACHE",
@@ -91,7 +89,6 @@ impl OverlayKind {
9189
OverlayKind::Rustfmt => {
9290
builder.rustfmt_info.version(builder, &builder.release_num("rustfmt"))
9391
}
94-
OverlayKind::Rls => builder.release(&builder.release_num("rls")),
9592
OverlayKind::RustAnalyzer => builder
9693
.rust_analyzer_info
9794
.version(builder, &builder.release_num("rust-analyzer/crates/rust-analyzer")),

0 commit comments

Comments
 (0)