Skip to content

Commit c78bfa3

Browse files
authored
Rollup merge of #51922 - japaric:llvm-tools-preview, r=alexcrichton
rename the llvm-tools component to llvm-tools-preview and tweak its image as per #49584 (comment) r? @alexcrichton or @Mark-Simulacrum
2 parents 87b714b + 6531879 commit c78bfa3

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

src/bootstrap/dist.rs

+10-7
Original file line numberDiff line numberDiff line change
@@ -1787,15 +1787,18 @@ impl Step for LlvmTools {
17871787
let tmp = tmpdir(builder);
17881788
let image = tmp.join("llvm-tools-image");
17891789
drop(fs::remove_dir_all(&image));
1790-
t!(fs::create_dir_all(&image.join("bin")));
17911790

17921791
// Prepare the image directory
1792+
let bindir = builder
1793+
.llvm_out(target)
1794+
.join("bin");
1795+
let dst = image.join("lib/rustlib")
1796+
.join(target)
1797+
.join("bin");
1798+
t!(fs::create_dir_all(&dst));
17931799
for tool in LLVM_TOOLS {
1794-
let exe = builder
1795-
.llvm_out(target)
1796-
.join("bin")
1797-
.join(exe(tool, &target));
1798-
builder.install(&exe, &image.join("bin"), 0o755);
1800+
let exe = bindir.join(exe(tool, &target));
1801+
builder.install(&exe, &dst, 0o755);
17991802
}
18001803

18011804
// Prepare the overlay
@@ -1818,7 +1821,7 @@ impl Step for LlvmTools {
18181821
.arg("--non-installed-overlay").arg(&overlay)
18191822
.arg(format!("--package-name={}-{}", name, target))
18201823
.arg("--legacy-manifest-dirs=rustlib,cargo")
1821-
.arg("--component-name=llvm-tools");
1824+
.arg("--component-name=llvm-tools-preview");
18221825

18231826

18241827
builder.run(&mut cmd);

src/tools/build-manifest/src/main.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,11 @@ impl Builder {
298298
self.package("rls-preview", &mut manifest.pkg, HOSTS);
299299
self.package("rustfmt-preview", &mut manifest.pkg, HOSTS);
300300
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
301-
self.package("llvm-tools", &mut manifest.pkg, TARGETS);
301+
self.package("llvm-tools-preview", &mut manifest.pkg, TARGETS);
302302

303303
let rls_present = manifest.pkg.contains_key("rls-preview");
304304
let rustfmt_present = manifest.pkg.contains_key("rustfmt-preview");
305-
let llvm_tools_present = manifest.pkg.contains_key("llvm-tools");
305+
let llvm_tools_present = manifest.pkg.contains_key("llvm-tools-preview");
306306

307307
if rls_present {
308308
manifest.renames.insert("rls".to_owned(), Rename { to: "rls-preview".to_owned() });
@@ -359,7 +359,7 @@ impl Builder {
359359
}
360360
if llvm_tools_present {
361361
extensions.push(Component {
362-
pkg: "llvm-tools".to_string(),
362+
pkg: "llvm-tools-preview".to_string(),
363363
target: host.to_string(),
364364
});
365365
}
@@ -486,7 +486,7 @@ impl Builder {
486486
&self.rls_version
487487
} else if component == "rustfmt" || component == "rustfmt-preview" {
488488
&self.rustfmt_version
489-
} else if component == "llvm-tools" {
489+
} else if component == "llvm-tools" || component == "llvm-tools-preview" {
490490
&self.llvm_tools_version
491491
} else {
492492
&self.rust_version
@@ -500,7 +500,7 @@ impl Builder {
500500
&self.rls_git_commit_hash
501501
} else if component == "rustfmt" || component == "rustfmt-preview" {
502502
&self.rustfmt_git_commit_hash
503-
} else if component == "llvm-tools" {
503+
} else if component == "llvm-tools" || component == "llvm-tools-preview" {
504504
&self.llvm_tools_git_commit_hash
505505
} else {
506506
&self.rust_git_commit_hash

0 commit comments

Comments
 (0)