minimize the rust-std component
This splits out a rustc-dev component with the compiler crates, and keeps the status quo of default installed files on nightly. The default changing to not install compiler libraries by default is left for a future pull request. However, on stable and beta, this does remove the compiler libraries from the set of libraries installed by default, as they are never needed there (per our stability story, they "cannot" be used).
This commit is contained in:
parent
446e5e57b6
commit
3a05616cb6
3 changed files with 112 additions and 33 deletions
|
|
@ -399,6 +399,7 @@ impl Builder {
|
|||
fn add_packages_to(&mut self, manifest: &mut Manifest) {
|
||||
let mut package = |name, targets| self.package(name, &mut manifest.pkg, targets);
|
||||
package("rustc", HOSTS);
|
||||
package("rustc-dev", HOSTS);
|
||||
package("cargo", HOSTS);
|
||||
package("rust-mingw", MINGW);
|
||||
package("rust-std", TARGETS);
|
||||
|
|
@ -481,6 +482,15 @@ impl Builder {
|
|||
components.push(host_component("rust-mingw"));
|
||||
}
|
||||
|
||||
// The compiler libraries are not stable for end users, but `rustc-dev` was only recently
|
||||
// split out of `rust-std`. We'll include it by default as a transition for nightly users,
|
||||
// but ship it as an optional component on the beta and stable channels.
|
||||
if self.rust_release == "nightly" {
|
||||
components.push(host_component("rustc-dev"));
|
||||
} else {
|
||||
extensions.push(host_component("rustc-dev"));
|
||||
}
|
||||
|
||||
// Tools are always present in the manifest,
|
||||
// but might be marked as unavailable if they weren't built.
|
||||
extensions.extend(vec![
|
||||
|
|
@ -498,6 +508,11 @@ impl Builder {
|
|||
.filter(|&&target| target != host)
|
||||
.map(|target| Component::from_str("rust-std", target))
|
||||
);
|
||||
extensions.extend(
|
||||
HOSTS.iter()
|
||||
.filter(|&&target| target != host)
|
||||
.map(|target| Component::from_str("rustc-dev", target))
|
||||
);
|
||||
extensions.push(Component::from_str("rust-src", "*"));
|
||||
|
||||
// If the components/extensions don't actually exist for this
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue