# Strip local symbols from macOS and Linux release bundles \(\#63429\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/8a4bd132a60c4091b37e35a9a4ff6d703e2d2645)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 8a4bd132a60c4091b37e35a9a4ff6d703e2d2645

Requested commit: 8a4bd132a60c4091b37e35a9a4ff6d703e2d2645

Commit: 8a4bd132a60c4091b37e35a9a4ff6d703e2d2645

Tree: 5c7053707608eccd63d493ee299546c12f0c5bf0

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Strip local symbols from macOS and Linux release bundles (#63429)

Not sure if this PR is 100% good, since it removes symbols from local
traces, leaving addresses only — but this what Windows seem to do
already, and we have those symbols on Sentry to restore from, which were
needed to normally read Linux perf traces already (see `perf.zip` in
https://github.com/zed-industries/zed/issues/59689#issuecomment-5452720248)

On the upside, uncompressed binaries' are now ~100MB less, which is a
lot — hence decided to open the PR for the review

-------------------

Strips debug info and local symbols from shipped macOS and Linux
binaries, matching what Windows already does with PDBs: `bundle-mac` now
always runs `dsymutil` before a new `strip -x` step, and `bundle-linux`
adds `--discard-all` plus `zed.dbg`/`remote_server.dbg` extraction via
`--only-keep-debug`.

Sentry uploads are unchanged and precede stripping.

The macOS binary UUID and the GNU build id survive stripping, so
user-provided traces stay recoverable without rebuilding at the
reporter's commit: `sample` output resolves via `atos` against the
archived `zed.dwarf`, and `perf.data` via `perf buildid-cache` against
the Sentry-archived binary.

zed binary:
macOS (2026-08-29 nightly): 420478976 -> 316503984 bytes (-24.7%,
-104.0MB)
Linux (v1.17.2 aarch64): 439417448 -> 336967256 bytes (-23.3%, -102.5MB)
Downloads shrink far less, symbols compress ~7:1: the macOS DMG loses
only ~15MB.

Release Notes:

- Improved installed size on macOS and Linux by stripping debug symbols
from release binaries (roughly -25%)
```

## Parents

- [ab7d21d4449165e794bd4a649bfa6b113ac192a9](https://git.cafe/gitcafe/zed/commit/ab7d21d4449165e794bd4a649bfa6b113ac192a9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/8a4bd132a60c4091b37e35a9a4ff6d703e2d2645?format=markdown)
