We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c637d44 + 8ac86d9 commit 75213a2Copy full SHA for 75213a2
Cargo.toml
@@ -77,3 +77,7 @@ test = false # no unit tests
77
name = "rustup-init"
78
path = "src/rustup-cli/main.rs"
79
test = false # no unit tests
80
+
81
+[profile.release]
82
+lto = true
83
+codegen-units = 1
src/rustup-cli/main.rs
@@ -55,12 +55,17 @@ mod term2;
55
mod errors;
56
mod help;
57
58
+use std::alloc::System;
59
use std::env;
60
use std::path::PathBuf;
61
use errors::*;
62
use rustup_dist::dist::TargetTriple;
63
use rustup::env_var::RUST_RECURSION_COUNT_MAX;
64
65
+// Always use the system allocator, to reduce binary size.
66
+#[global_allocator]
67
+static _ALLOCATOR: System = System;
68
69
fn main() {
70
if let Err(ref e) = run_rustup() {
71
common::report_error(e);
0 commit comments