Skip to content

Commit

Permalink
Build with LTO
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Oct 18, 2018
1 parent cb16ec9 commit 8ac86d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ test = false # no unit tests
name = "rustup-init"
path = "src/rustup-cli/main.rs"
test = false # no unit tests

[profile.release]
lto = true
codegen-units = 1
10 changes: 5 additions & 5 deletions src/rustup-cli/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

#![recursion_limit = "1024"]

use std::alloc::System;

#[global_allocator]
static A: System = System;

#[macro_use]
extern crate error_chain;
extern crate rustup_dist;
Expand Down Expand Up @@ -60,12 +55,17 @@ mod term2;
mod errors;
mod help;

use std::alloc::System;
use std::env;
use std::path::PathBuf;
use errors::*;
use rustup_dist::dist::TargetTriple;
use rustup::env_var::RUST_RECURSION_COUNT_MAX;

// Always use the system allocator, to reduce binary size.
#[global_allocator]
static _ALLOCATOR: System = System;

fn main() {
if let Err(ref e) = run_rustup() {
common::report_error(e);
Expand Down

0 comments on commit 8ac86d9

Please sign in to comment.