Skip to content

Commit

Permalink
Cargo.toml: Update release profile, add releaselto
Browse files Browse the repository at this point in the history
- `release` should use `panic=abort` by default because we make
  heavy use of FFI and this is safest, and I don't think we need
  unwinding anyways
- The `releaselto` produces smallest binaries

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Aug 23, 2023
1 parent 512dedd commit 2f8c2b1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ members = ["cli", "lib", "xtask"]
opt-level = 1 # No optimizations are too slow for us.

[profile.release]
# RPMs/debs/etc want debuginfo by default
lto = "thin"
# We use FFI so this is safest
panic = "abort"
# We assume we're being delivered via e.g. RPM which supports split debuginfo
debug = true

[profile.releaselto]
codegen-units = 1
inherits = "release"
lto = "yes"

# See https://github.com/coreos/cargo-vendor-filterer
[workspace.metadata.vendor-filter]
# For now we only care about tier 1+2 Linux. (In practice, it's unlikely there is a tier3-only Linux dependency)
Expand Down

0 comments on commit 2f8c2b1

Please sign in to comment.