Skip to content

Commit 4a89212

Browse files
committed
maa-cli: build with LTO and strip
Closes #25. Signed-off-by: Loong <[email protected]>
1 parent f4feaa3 commit 4a89212

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Formula/maa-cli.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ class MaaCli < Formula
1414
depends_on "rust" => :build
1515

1616
def install
17-
system "cargo", "install", "--path", "maa-cli", "--locked", "--root", prefix,
18-
"--no-default-features", "--bin", "maa"
17+
ENV["CARGO_PROFILE_RELEASE_CODEGEN_UNITS"] = "1"
18+
ENV["CARGO_PROFILE_RELEASE_LTO"] = "true"
19+
ENV["CARGO_PROFILE_RELEASE_STRIP"] = "true"
20+
system "cargo", "install", "--no-default-features", *std_cargo_args(path: "maa-cli")
1921
fish_completion.install "maa-cli/share/fish/vendor_completions.d/maa.fish"
2022
end
2123

0 commit comments

Comments
 (0)