Skip to content

Commit

Permalink
Use LTO
Browse files Browse the repository at this point in the history
  • Loading branch information
dberlin committed May 5, 2024
1 parent cd4c097 commit 5b9ed1a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ ar = "x86_64-w64-mingw32-gcc-ar"
# enabled for the target, so let's turn that on here.
[target.x86_64-pc-windows-msvc]
rustflags = "-C target-feature=+crt-static"

[aarch64-unknown-linux-gnu]
rustflags = ["-C", "linker-plugin-lto", "-C", "link-arg=-fuse-ld=lld"]

12 changes: 7 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,25 @@ members = [
"wezterm-gui",
"wezterm-mux-server",
"wezterm-open-url",
"wezterm-ssh"
"wezterm-ssh",
]
resolver = "2"
exclude = [
"termwiz/codegen"
]
exclude = ["termwiz/codegen"]

[profile.release]
opt-level = 3
# debug = 2
lto = "fat"
codegen-units = 1

[profile.dev]
# https://jakedeichert.com/blog/reducing-rust-incremental-compilation-times-on-macos-by-70-percent/
# Disabled because it breaks builds on Windows
#split-debuginfo = "unpacked"

[patch.crates-io]
xcb = { git = "https://github.com/rust-x-bindings/rust-xcb", rev = "dbdaa01c178c6fbe68bd51b7ad44c08172181083" } # waiting on a release with https://github.com/rust-x-bindings/rust-xcb/pull/230

# We use our own vendored cairo, which has minimal deps and should just
# build via cargo.
cairo-sys-rs = {path="deps/cairo", version="0.18.0"}
cairo-sys-rs = { path = "deps/cairo", version = "0.18.0" }

0 comments on commit 5b9ed1a

Please sign in to comment.