Distribute cg_clif as a rustup component

This commit is contained in:
bjorn3 2021-02-02 19:45:17 +01:00 committed by bjorn3
parent 54e57e66ff
commit a58327dc01
9 changed files with 152 additions and 31 deletions

View file

@ -192,7 +192,8 @@ static PKG_INSTALLERS: &[&str] = &["x86_64-apple-darwin", "aarch64-apple-darwin"
static MINGW: &[&str] = &["i686-pc-windows-gnu", "x86_64-pc-windows-gnu"];
static NIGHTLY_ONLY_COMPONENTS: &[PkgType] = &[PkgType::Miri, PkgType::JsonDocs];
static NIGHTLY_ONLY_COMPONENTS: &[PkgType] =
&[PkgType::Miri, PkgType::JsonDocs, PkgType::RustcCodegenCranelift];
macro_rules! t {
($e:expr) => {
@ -336,7 +337,15 @@ impl Builder {
// NOTE: this profile is effectively deprecated; do not add new components to it.
let mut complete = default;
complete.extend([Rls, RustAnalyzer, RustSrc, LlvmTools, RustAnalysis, Miri]);
complete.extend([
Rls,
RustAnalyzer,
RustSrc,
LlvmTools,
RustAnalysis,
Miri,
RustcCodegenCranelift,
]);
profile("complete", &complete);
// The compiler libraries are not stable for end users, and they're also huge, so we only
@ -423,7 +432,8 @@ impl Builder {
| PkgType::Rustfmt
| PkgType::LlvmTools
| PkgType::RustAnalysis
| PkgType::JsonDocs => {
| PkgType::JsonDocs
| PkgType::RustcCodegenCranelift => {
extensions.push(host_component(pkg));
}
PkgType::RustcDev | PkgType::RustcDocs => {

View file

@ -57,6 +57,7 @@ pkg_type! {
LlvmTools = "llvm-tools"; preview = true,
Miri = "miri"; preview = true,
JsonDocs = "rust-docs-json"; preview = true,
RustcCodegenCranelift = "rustc-codegen-cranelift"; preview = true,
}
impl PkgType {
@ -80,6 +81,7 @@ impl PkgType {
PkgType::Rustfmt => false,
PkgType::LlvmTools => false,
PkgType::Miri => false,
PkgType::RustcCodegenCranelift => false,
PkgType::Rust => true,
PkgType::RustStd => true,
@ -106,6 +108,8 @@ impl PkgType {
ReproducibleArtifacts => HOSTS,
RustcDocs => HOSTS,
Cargo => HOSTS,
// FIXME should this use the exact list of targets for which we build cg_clif?
RustcCodegenCranelift => HOSTS,
RustMingw => MINGW,
RustStd => TARGETS,
HtmlDocs => HOSTS,