aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2018-05-17 11:28:50 +0000
committerSven-Hendrik Haase <svenstaro@gmail.com>2018-05-17 11:28:50 +0000
commit4f2f3a435e4ee5822f8be58ba84c0f2bb3f78c3c (patch)
tree447ff795206ec8f84b6b3855e71ad2cfed8d31a2
parentv0.1.3 (diff)
downloadminiserve-4f2f3a435e4ee5822f8be58ba84c0f2bb3f78c3c.tar.gz
miniserve-4f2f3a435e4ee5822f8be58ba84c0f2bb3f78c3c.zip
Activate lto for binary size reductions
-rw-r--r--Cargo.toml3
-rw-r--r--Makefile12
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