Skip to content

Commit

Permalink
[aptos-cli] Add build size optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario authored and aptos-bot committed May 20, 2022
1 parent 55df8d9 commit 9bcc5ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ default-members = [
[profile.release]
debug = true

[profile.cli]
inherits = "release"
debug = false
opt-level = "z"
lto = true
strip = true
codegen-units = 1

[profile.bench]
debug = true

Expand Down
2 changes: 1 addition & 1 deletion scripts/cli/build_cli_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ elif [ "$OS" == "Linux" ]; then
fi

echo "Building release $VERSION of $NAME for $OS-$ARCH"
cargo build -p $CRATE_NAME --release
cargo build -p $CRATE_NAME --profile cli

EXIT_CODE=$?
if [ "$EXIT_CODE" != "0" ]; then
Expand Down

0 comments on commit 9bcc5ef

Please sign in to comment.