summaryrefslogtreecommitdiff
path: root/llvm-tools-install.patch
blob: 876e8a6034f3ea5dcb4d14e9eb0b06316683926b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 23a34c18f7b2ce8b20fed717ef48e2be1776246b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= <mkroening@posteo.net>
Date: Sun, 11 Dec 2022 12:19:17 +0100
Subject: [PATCH] bootstrap: Allow installing llvm-tools

---
 src/bootstrap/builder.rs | 1 +
 src/bootstrap/install.rs | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 8ee6d49da8f0e..3f551dc119b5d 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -744,6 +744,7 @@ impl<'a> Builder<'a> {
                 install::RustDemangler,
                 install::Clippy,
                 install::Miri,
+                install::LlvmTools,
                 install::Analysis,
                 install::Src,
                 install::Rustc
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index 7672b7c913594..c53d0d7e4cb7c 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -205,6 +205,12 @@ install!((self, builder, _config),
             );
         }
     };
+    LlvmTools, alias = "llvm-tools", Self::should_build(_config), only_hosts: true, {
+        let tarball = builder
+            .ensure(dist::LlvmTools { target: self.target })
+            .expect("missing llvm-tools");
+        install_sh(builder, "llvm-tools", self.compiler.stage, Some(self.target), &tarball);
+    };
     Rustfmt, alias = "rustfmt", Self::should_build(_config), only_hosts: true, {
         if let Some(tarball) = builder.ensure(dist::Rustfmt {
             compiler: self.compiler,