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 https://github.com/rust-lang/rust/issues/49584#issuecomment-401217483

r? @alexcrichton or @Mark-Simulacrum
This commit is contained in:
Pietro Albini 2018-07-01 21:18:50 +02:00 committed by GitHub
commit c78bfa33dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View File

@ -1787,15 +1787,18 @@ impl Step for LlvmTools {
let tmp = tmpdir(builder);
let image = tmp.join("llvm-tools-image");
drop(fs::remove_dir_all(&image));
t!(fs::create_dir_all(&image.join("bin")));
// Prepare the image directory
let bindir = builder
.llvm_out(target)
.join("bin");
let dst = image.join("lib/rustlib")
.join(target)
.join("bin");
t!(fs::create_dir_all(&dst));
for tool in LLVM_TOOLS {
let exe = builder
.llvm_out(target)
.join("bin")
.join(exe(tool, &target));
builder.install(&exe, &image.join("bin"), 0o755);
let exe = bindir.join(exe(tool, &target));
builder.install(&exe, &dst, 0o755);
}
// Prepare the overlay
@ -1818,7 +1821,7 @@ impl Step for LlvmTools {
.arg("--non-installed-overlay").arg(&overlay)
.arg(format!("--package-name={}-{}", name, target))
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg("--component-name=llvm-tools");
.arg("--component-name=llvm-tools-preview");
builder.run(&mut cmd);

View File

@ -298,11 +298,11 @@ impl Builder {
self.package("rls-preview", &mut manifest.pkg, HOSTS);
self.package("rustfmt-preview", &mut manifest.pkg, HOSTS);
self.package("rust-analysis", &mut manifest.pkg, TARGETS);
self.package("llvm-tools", &mut manifest.pkg, TARGETS);
self.package("llvm-tools-preview", &mut manifest.pkg, TARGETS);
let rls_present = manifest.pkg.contains_key("rls-preview");
let rustfmt_present = manifest.pkg.contains_key("rustfmt-preview");
let llvm_tools_present = manifest.pkg.contains_key("llvm-tools");
let llvm_tools_present = manifest.pkg.contains_key("llvm-tools-preview");
if rls_present {
manifest.renames.insert("rls".to_owned(), Rename { to: "rls-preview".to_owned() });
@ -359,7 +359,7 @@ impl Builder {
}
if llvm_tools_present {
extensions.push(Component {
pkg: "llvm-tools".to_string(),
pkg: "llvm-tools-preview".to_string(),
target: host.to_string(),
});
}
@ -486,7 +486,7 @@ impl Builder {
&self.rls_version
} else if component == "rustfmt" || component == "rustfmt-preview" {
&self.rustfmt_version
} else if component == "llvm-tools" {
} else if component == "llvm-tools" || component == "llvm-tools-preview" {
&self.llvm_tools_version
} else {
&self.rust_version
@ -500,7 +500,7 @@ impl Builder {
&self.rls_git_commit_hash
} else if component == "rustfmt" || component == "rustfmt-preview" {
&self.rustfmt_git_commit_hash
} else if component == "llvm-tools" {
} else if component == "llvm-tools" || component == "llvm-tools-preview" {
&self.llvm_tools_git_commit_hash
} else {
&self.rust_git_commit_hash