From 4f2f3a435e4ee5822f8be58ba84c0f2bb3f78c3c Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Thu, 17 May 2018 13:28:50 +0200 Subject: Activate lto for binary size reductions --- Cargo.toml | 3 +++ Makefile | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 63853f5..5982d45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,9 @@ categories = ["command-line-utilities", "command-line-interface"] travis-ci = { repository = "svenstaro/miniserve", branch = "master" } maintenance = { status = "actively-developed" } +[profile.release] +lto = true + [dependencies] clap = "2.29" actix = "0.5" diff --git a/Makefile b/Makefile index 50d91a0..d308975 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ .PHONY: build-linux build-linux: cargo build --target x86_64-unknown-linux-musl --release - strip target/x86_64-unknown-linux-musl/release/genact - upx target/x86_64-unknown-linux-musl/release/genact + strip target/x86_64-unknown-linux-musl/release/miniserve + upx target/x86_64-unknown-linux-musl/release/miniserve .PHONY: build-win build-win: RUSTFLAGS="-C linker=x86_64-w64-mingw32-gcc" cargo build --target x86_64-pc-windows-gnu --release - strip target/x86_64-pc-windows-gnu/release/genact.exe - upx target/x86_64-pc-windows-gnu/release/genact.exe + strip target/x86_64-pc-windows-gnu/release/miniserve.exe + upx target/x86_64-pc-windows-gnu/release/miniserve.exe .PHONY: build-apple build-apple: cargo build --target x86_64-apple-darwin --release - strip target/x86_64-apple-darwin/release/genact - upx target/x86_64-apple-darwin/release/genact + strip target/x86_64-apple-darwin/release/miniserve + upx target/x86_64-apple-darwin/release/miniserve -- cgit v1.2.3