Skip to content

Commit

Permalink
Configure profile.release
Browse files Browse the repository at this point in the history
  • Loading branch information
jez committed May 14, 2020
1 parent 87645eb commit b8373b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ script:
- ./bazel test --test_output=errors //test

before_deploy:
# We use cargo for the release, because I couldn't figure out how to tell
# rules_rust to pass `-C lto=true` to all dependencies.
- cargo install --path .
- cd "$HOME/.cargo/bin" && strip ./as-tree
- cd "$HOME/.cargo/bin" && zip "as-tree-${TRAVIS_TAG}-${TRAVIS_OS_NAME}.zip" ./as-tree

deploy:
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ ansi_term = "0.12"
lscolors = "0.7"
atty = "0.2"

# These two options plus strip'ing the binary was measured to cut the size by
# about 173KB (-44%)
[profile.release]
lto = true
panic = "abort"

[raze]
# The WORKSPACE relative path to the Cargo.toml working directory.
workspace_path = "//third_party/cargo"
Expand Down

0 comments on commit b8373b1

Please sign in to comment.