Bug 246993 - Mk/Uses/cargo.mk: Strip binaries with cargo
Summary: Mk/Uses/cargo.mk: Strip binaries with cargo
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Rust Team
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2020-06-04 23:43 UTC by Tobias Kortkamp
Modified: 2024-09-10 11:37 UTC (History)
4 users (show)

See Also:


Attachments
[PATCH] USES=cargo: strip release binaries (758 bytes, patch)
2024-06-18 23:10 UTC, Siva Mahadevan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Kortkamp freebsd_committer freebsd_triage 2020-06-04 23:43:38 UTC
When stabilized, add `strip = "symbols"` to `[profile.release]` in
cargo.mk and potentially drop many of the STRIP_CMD in USES=cargo ports.

This already works with nightly, but since the feature is unstable
it requires adding `cargo-features = ["strip"]` to the top of
Cargo.toml.

https://github.com/rust-lang/cargo/pull/8246
Comment 1 Siva Mahadevan 2024-06-18 23:10:43 UTC
Created attachment 251551 [details]
[PATCH] USES=cargo: strip release binaries

Will this patch be enough? If this is accepted, I can submit a further patch removing STRIP_CMD from all ports that use cargo.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2024-06-20 12:07:37 UTC
(In reply to Siva Mahadevan from comment #1)
LGTM
Comment 3 Siva Mahadevan 2024-06-21 19:53:53 UTC
(In reply to Mikael Urankar from comment #2)

Thanks. Once the above patch is merged, I'll submit the rest of the STRIP_CMD cleanup patch to this bug.
Comment 4 Siva Mahadevan 2024-07-26 14:41:03 UTC
Any progress on getting this merged?
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2024-08-27 13:47:35 UTC
(In reply to Siva Mahadevan from comment #4)
Done
Comment 7 Siva Mahadevan 2024-09-01 14:55:44 UTC
Review for STRIP_CMD removal here https://reviews.freebsd.org/D46503
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-09-10 11:04:29 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c0d07f1127793ffc97a6c1db78423d0d16bdc5ef

commit c0d07f1127793ffc97a6c1db78423d0d16bdc5ef
Author:     Siva Mahadevan <me@svmhdvn.name>
AuthorDate: 2024-09-10 10:58:07 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-09-10 10:58:07 +0000

    */*: remove STRIP_CMD calls in rust based ports

    This is not needed after bc4fedc1fec0d359365c04d43be9e32bf101a50e

    PR:             246993
    Differential Revision:  https://reviews.freebsd.org/D46503

 accessibility/sctd/Makefile                 | 3 ---
 archivers/ouch/Makefile                     | 3 ---
 archivers/py-cramjam/Makefile               | 3 ---
 audio/ebur128/Makefile                      | 1 -
 audio/lewton/Makefile                       | 1 -
 audio/mmtc/Makefile                         | 3 ---
 audio/myxer/Makefile                        | 3 ---
 audio/ncspot/Makefile                       | 3 ---
 audio/netease-music-tui/Makefile            | 3 ---
 audio/songrec/Makefile                      | 3 ---
 audio/spotify-player/Makefile               | 3 ---
 audio/spotify-tui/Makefile                  | 3 ---
 audio/spotifyd/Makefile                     | 1 -
 audio/wasabi/Makefile                       | 3 ---
 benchmarks/inferno/Makefile                 | 3 ---
 cad/svlint/Makefile                         | 5 -----
 cad/svls/Makefile                           | 3 ---
 cad/veryl/Makefile                          | 3 ---
 converters/yj-bruceadams/Makefile           | 3 ---
 databases/diesel/Makefile                   | 3 ---
 databases/frece/Makefile                    | 3 ---
 databases/gobang/Makefile                   | 3 ---
 databases/movine/Makefile                   | 3 ---
 databases/ods2sql/Makefile                  | 3 ---
 databases/qdrant/Makefile                   | 5 -----
 databases/quake/Makefile                    | 3 ---
 databases/replibyte/Makefile                | 3 ---
 databases/sqlx-cli/Makefile                 | 5 -----
 databases/surrealdb/Makefile                | 3 ---
 databases/xls2txt/Makefile                  | 3 ---
 deskutils/jot/Makefile                      | 3 ---
 deskutils/just/Makefile                     | 3 ---
 deskutils/lazycli/Makefile                  | 3 ---
 deskutils/pipecolor/Makefile                | 3 ---
 deskutils/pueue/Makefile                    | 5 -----
 deskutils/rwpspread/Makefile                | 2 --
 deskutils/sigi/Makefile                     | 1 -
 deskutils/skim/Makefile                     | 3 ---
 deskutils/taskwarrior-tui/Makefile          | 3 ---
 deskutils/thokr/Makefile                    | 3 ---
 devel/amber/Makefile                        | 5 -----
 devel/argc/Makefile                         | 3 ---
 devel/bacon/Makefile                        | 3 ---
 devel/bingrep/Makefile                      | 3 ---
 devel/bunyan/Makefile                       | 3 ---
 devel/cargo-about/Makefile                  | 3 ---
 devel/cargo-bloat/Makefile                  | 3 ---
 devel/cargo-cache/Makefile                  | 3 ---
 devel/cargo-deny/Makefile                   | 3 ---
 devel/cargo-depgraph/Makefile               | 3 ---
 devel/cargo-edit/Makefile                   | 5 -----
 devel/cargo-generate/Makefile               | 3 ---
 devel/cargo-hack/Makefile                   | 3 ---
 devel/cargo-leptos/Makefile                 | 3 ---
 devel/cargo-llvm-cov/Makefile               | 3 ---
 devel/cargo-mutants/Makefile                | 3 ---
 devel/cargo-spellcheck/Makefile             | 3 ---
 devel/cargo-tarpaulin/Makefile              | 3 ---
 devel/cargo-udeps/Makefile                  | 3 ---
 devel/cbfmt/Makefile                        | 3 ---
 devel/cocogitto/Makefile                    | 3 ---
 devel/convco/Makefile                       | 3 ---
 devel/desed/Makefile                        | 2 --
 devel/dra/Makefile                          | 3 ---
 devel/dtool/Makefile                        | 3 ---
 devel/dura/Makefile                         | 3 ---
 devel/elfcat/Makefile                       | 3 ---
 devel/fnm/Makefile                          | 3 ---
 devel/fsx/Makefile                          | 1 -
 devel/gbump/Makefile                        | 5 -----
 devel/gfold/Makefile                        | 1 -
 devel/ghostie/Makefile                      | 3 ---
 devel/git-absorb/Makefile                   | 1 -
 devel/git-branchless/Makefile               | 3 ---
 devel/git-cinnabar/Makefile                 | 1 -
 devel/git-cliff/Makefile                    | 6 ------
 devel/git-delta/Makefile                    | 3 ---
 devel/git-repo-manager/Makefile             | 3 ---
 devel/git-workspace/Makefile                | 3 ---
 devel/gitoxide/Makefile                     | 5 -----
 devel/gitu/Makefile                         | 3 ---
 devel/gitui/Makefile                        | 3 ---
 devel/glitter/Makefile                      | 3 ---
 devel/grcov/Makefile                        | 3 ---
 devel/grex/Makefile                         | 1 -
 devel/hvm/Makefile                          | 3 ---
 devel/interactive_rebase_tool/Makefile      | 1 -
 devel/jetbrains-restarter/Makefile          | 3 ---
 devel/omnilinter/Makefile                   | 1 -
 devel/parol-ls/Makefile                     | 3 ---
 devel/parol/Makefile                        | 3 ---
 devel/patsh/Makefile                        | 3 ---
 devel/pijul/Makefile                        | 3 ---
 devel/py-ddtrace/Makefile                   | 3 ---
 devel/py-jellyfish/Makefile                 | 3 ---
 devel/py-libcst/Makefile                    | 3 ---
 devel/py-maturin/Makefile                   | 3 ---
 devel/py-orjson/Makefile                    | 3 ---
 devel/py-pycrdt/Makefile                    | 3 ---
 devel/py-pyproject-fmt-rust/Makefile        | 3 ---
 devel/py-regress/Makefile                   | 3 ---
 devel/py-rpds-py/Makefile                   | 3 ---
 devel/py-watchfiles/Makefile                | 3 ---
 devel/pylyzer/Makefile                      | 3 ---
 devel/rust-analyzer/Makefile                | 3 ---
 devel/rust-script/Makefile                  | 3 ---
 devel/sccache/Makefile                      | 3 ---
 devel/selene/Makefile                       | 3 ---
 devel/sentry-cli/Makefile                   | 3 ---
 devel/snazy/Makefile                        | 3 ---
 devel/stylua/Makefile                       | 3 ---
 devel/tagref/Makefile                       | 3 ---
 devel/texlab/Makefile                       | 1 -
 devel/the-way/Makefile                      | 3 ---
 devel/tokei/Makefile                        | 3 ---
 devel/tokio-console/Makefile                | 3 ---
 devel/tree-sitter-graph/Makefile            | 3 ---
 devel/twiggy/Makefile                       | 3 ---
 devel/typeshare/Makefile                    | 3 ---
 devel/wrangler/Makefile                     | 3 ---
 dns/dog/Makefile                            | 3 ---
 dns/doh-proxy/Makefile                      | 3 ---
 dns/encrypted-dns-server/Makefile           | 1 -
 editors/amp/Makefile                        | 3 ---
 editors/helix/Makefile                      | 3 ---
 editors/kakoune-lsp/Makefile                | 1 -
 editors/kibi/Makefile                       | 3 ---
 editors/languageclient-neovim/Makefile      | 3 ---
 editors/lapce/Makefile                      | 2 --
 editors/neovim-gtk/Makefile                 | 1 -
 editors/ox/Makefile                         | 3 ---
 editors/parinfer-rust/Makefile              | 2 --
 finance/ord/Makefile                        | 3 ---
 finance/tickrs/Makefile                     | 3 ---
 ftp/termscp/Makefile                        | 3 ---
 ftp/unftp/Makefile                          | 3 ---
 games/anki/Makefile                         | 1 -
 games/dose-response/Makefile                | 1 -
 games/genact/Makefile                       | 1 -
 games/jaggedalliance2/Makefile              | 5 -----
 games/rpg-cli/Makefile                      | 3 ---
 games/veloren-weekly/Makefile               | 1 -
 graphics/asciinema-agg/Makefile             | 3 ---
 graphics/gifski/Makefile                    | 3 ---
 graphics/libimagequant/Makefile             | 1 -
 graphics/menyoki/Makefile                   | 3 ---
 graphics/noaa-apt/Makefile                  | 3 ---
 graphics/oculante/Makefile                  | 3 ---
 graphics/pastel/Makefile                    | 3 ---
 graphics/resvg/Makefile                     | 3 ---
 graphics/rx/Makefile                        | 3 ---
 graphics/satty/Makefile                     | 1 -
 graphics/viu/Makefile                       | 3 ---
 japanese/cskk/Makefile                      | 1 -
 japanese/py-SudachiPy/Makefile              | 3 ---
 lang/amber/Makefile                         | 3 ---
 lang/antimony/Makefile                      | 3 ---
 lang/asm-lsp/Makefile                       | 3 ---
 lang/bend/Makefile                          | 3 ---
 lang/frawk/Makefile                         | 3 ---
 lang/gleam/Makefile                         | 3 ---
 lang/gluon/Makefile                         | 3 ---
 lang/neocmakelsp/Makefile                   | 3 ---
 lang/pomsky/Makefile                        | 3 ---
 lang/rustpython/Makefile                    | 3 ---
 lang/typstfmt/Makefile                      | 3 ---
 lang/typstyle/Makefile                      | 3 ---
 math/elan/Makefile                          | 1 -
 math/kalc/Makefile                          | 3 ---
 math/leangz/Makefile                        | 3 ---
 math/py-rustworkx/Makefile                  | 3 ---
 misc/aichat/Makefile                        | 3 ---
 misc/air/Makefile                           | 3 ---
 misc/amazon-qldb-shell/Makefile             | 3 ---
 misc/arrow-datafusion/Makefile              | 3 ---
 misc/bedrust/Makefile                       | 3 ---
 misc/binocle/Makefile                       | 3 ---
 misc/broot/Makefile                         | 1 -
 misc/coloursum/Makefile                     | 3 ---
 misc/dijo/Makefile                          | 3 ---
 misc/dotenv-linter/Makefile                 | 3 ---
 misc/jirust/Makefile                        | 3 ---
 misc/lscolors/Makefile                      | 3 ---
 misc/ooo/Makefile                           | 3 ---
 misc/pqrs/Makefile                          | 3 ---
 misc/py-lazrs/Makefile                      | 3 ---
 misc/py-polars/Makefile                     | 3 ---
 misc/py-safetensors/Makefile                | 3 ---
 misc/rsclock/Makefile                       | 3 ---
 misc/ruut/Makefile                          | 3 ---
 misc/silicon/Makefile                       | 3 ---
 misc/star-history/Makefile                  | 3 ---
 misc/tenere/Makefile                        | 3 ---
 misc/xd-rust/Makefile                       | 3 ---
 misc/xplr/Makefile                          | 2 --
 misc/zine/Makefile                          | 3 ---
 multimedia/alass/Makefile                   | 3 ---
 multimedia/gstreamer1-plugins-rust/Makefile | 3 ---
 multimedia/helvum/Makefile                  | 3 ---
 multimedia/librav1e/Makefile                | 3 ---
 multimedia/librespot/Makefile               | 3 ---
 multimedia/rav1e/Makefile                   | 5 -----
 multimedia/termplay/Makefile                | 3 ---
 multimedia/wl-screenrec/Makefile            | 1 -
 net-im/fractal/Makefile                     | 5 -----
 net-im/gurk-rs/Makefile                     | 1 -
 net-im/yume/Makefile                        | 3 ---
 net-mgmt/bandwhich/Makefile                 | 3 ---
 net-mgmt/geom-exporter/Makefile             | 1 -
 net-mgmt/nfs-exporter/Makefile              | 1 -
 net-mgmt/rs-aggregate/Makefile              | 2 --
 net-p2p/intermodal/Makefile                 | 3 ---
 net-p2p/twitch-tui/Makefile                 | 3 ---
 net/findomain/Makefile                      | 1 -
 net/krill/Makefile                          | 4 ----
 net/oha/Makefile                            | 3 ---
 net/rabbiteer/Makefile                      | 3 ---
 net/rathole/Makefile                        | 3 ---
 net/rosenpass/Makefile                      | 1 -
 net/routinator/Makefile                     | 1 -
 net/rsyn/Makefile                           | 3 ---
 net/rustdesk-server/Makefile                | 3 ---
 net/s3m/Makefile                            | 3 ---
 net/shadowsocks-rust/Makefile               | 4 ----
 net/trippy/Makefile                         | 3 ---
 net/udp-over-tcp/Makefile                   | 5 -----
 net/wstunnel/Makefile                       | 3 ---
 ports-mgmt/sccache-overlay/Makefile         | 1 -
 security/arti/Makefile                      | 1 -
 security/authoscope/Makefile                | 5 -----
 security/cargo-audit/Makefile               | 3 ---
 security/cloak/Makefile                     | 3 ---
 security/diswall/Makefile                   | 3 ---
 security/flawz/Makefile                     | 5 -----
 security/gpg-tui/Makefile                   | 2 --
 security/py-cryptography/Makefile           | 3 ---
 security/ratify/Makefile                    | 3 ---
 security/rustls-ffi/Makefile                | 1 -
 security/sequoia-sq/Makefile                | 3 ---
 security/ssh-vault/Makefile                 | 5 -----
 security/vaultwarden/Makefile               | 4 ----
 security/weggli/Makefile                    | 3 ---
 shells/atuin/Makefile                       | 3 ---
 shells/ion/Makefile                         | 3 ---
 shells/nushell/Makefile                     | 3 ---
 shells/sheldon/Makefile                     | 1 -
 shells/shell-hist/Makefile                  | 3 ---
 shells/shellharden/Makefile                 | 3 ---
 shells/starship/Makefile                    | 3 ---
 sysutils/async/Makefile                     | 3 ---
 sysutils/b3sum/Makefile                     | 3 ---
 sysutils/bkt/Makefile                       | 3 ---
 sysutils/bottom/Makefile                    | 1 -
 sysutils/conserve/Makefile                  | 3 ---
 sysutils/ddh/Makefile                       | 3 ---
 sysutils/diskonaut/Makefile                 | 3 ---
 sysutils/diskus/Makefile                    | 1 -
 sysutils/dua-cli/Makefile                   | 3 ---
 sysutils/dust/Makefile                      | 1 -
 sysutils/exa/Makefile                       | 1 -
 sysutils/eza/Makefile                       | 1 -
 sysutils/faketty/Makefile                   | 3 ---
 sysutils/fclones/Makefile                   | 3 ---
 sysutils/fd/Makefile                        | 1 -
 sysutils/flipperbit/Makefile                | 3 ---
 sysutils/flowgger/Makefile                  | 1 -
 sysutils/fselect/Makefile                   | 1 -
 sysutils/fusefs-sandboxfs/Makefile          | 1 -
 sysutils/fusefs-xfuse/Makefile              | 1 -
 sysutils/handlr/Makefile                    | 3 ---
 sysutils/hexyl/Makefile                     | 3 ---
 sysutils/jail_exporter/Makefile             | 1 -
 sysutils/joshuto/Makefile                   | 3 ---
 sysutils/kubie/Makefile                     | 1 -
 sysutils/lsd/Makefile                       | 3 ---
 sysutils/mcfly/Makefile                     | 2 --
 sysutils/mise/Makefile                      | 3 ---
 sysutils/mprocs/Makefile                    | 3 ---
 sysutils/onefetch/Makefile                  | 3 ---
 sysutils/potnet/Makefile                    | 4 ----
 sysutils/process-viewer/Makefile            | 3 ---
 sysutils/procs/Makefile                     | 3 ---
 sysutils/runiq/Makefile                     | 3 ---
 sysutils/rust-coreutils/Makefile            | 3 ---
 sysutils/rust-findutils/Makefile            | 5 -----
 sysutils/syngesture/Makefile                | 3 ---
 sysutils/szyszka/Makefile                   | 3 ---
 sysutils/tailspin/Makefile                  | 1 -
 sysutils/tealdeer/Makefile                  | 1 -
 sysutils/tere/Makefile                      | 3 ---
 sysutils/tiempo/Makefile                    | 3 ---
 sysutils/topgrade/Makefile                  | 1 -
 sysutils/tuckr/Makefile                     | 3 ---
 sysutils/wiper/Makefile                     | 3 ---
 sysutils/xcp/Makefile                       | 3 ---
 sysutils/yadf/Makefile                      | 3 ---
 sysutils/zoxide/Makefile                    | 3 ---
 sysutils/ztop/Makefile                      | 1 -
 textproc/angle-grinder/Makefile             | 3 ---
 textproc/aq/Makefile                        | 3 ---
 textproc/bat/Makefile                       | 1 -
 textproc/biodiff/Makefile                   | 5 -----
 textproc/cast2gif/Makefile                  | 3 ---
 textproc/choose/Makefile                    | 3 ---
 textproc/code-minimap/Makefile              | 2 --
 textproc/comrak/Makefile                    | 3 ---
 textproc/csview/Makefile                    | 3 ---
 textproc/csvlens/Makefile                   | 3 ---
 textproc/difftastic/Makefile                | 3 ---
 textproc/fblog/Makefile                     | 3 ---
 textproc/hq/Makefile                        | 3 ---
 textproc/htmlq/Makefile                     | 3 ---
 textproc/jaq/Makefile                       | 3 ---
 textproc/jless/Makefile                     | 3 ---
 textproc/jql/Makefile                       | 1 -
 textproc/mdbook-mermaid/Makefile            | 3 ---
 textproc/mdbook/Makefile                    | 3 ---
 textproc/py-jiter/Makefile                  | 3 ---
 textproc/py-tiktoken/Makefile               | 3 ---
 textproc/py-tokenizers/Makefile             | 3 ---
 textproc/riffdiff/Makefile                  | 3 ---
 textproc/ripgrep-all/Makefile               | 4 ----
 textproc/ripgrep/Makefile                   | 1 -
 textproc/sad/Makefile                       | 3 ---
 textproc/sd/Makefile                        | 1 -
 textproc/sonic/Makefile                     | 1 -
 textproc/ttynt/Makefile                     | 3 ---
 textproc/typst/Makefile                     | 1 -
 textproc/xsv-rs/Makefile                    | 3 ---
 www/castor/Makefile                         | 1 -
 www/cobalt/Makefile                         | 3 ---
 www/dezoomify-rs/Makefile                   | 3 ---
 www/dot-http/Makefile                       | 3 ---
 www/drill/Makefile                          | 3 ---
 www/feroxbuster/Makefile                    | 3 ---
 www/ffsend/Makefile                         | 1 -
 www/geckodriver/Makefile                    | 3 ---
 www/jwt-cli/Makefile                        | 3 ---
 www/loco/Makefile                           | 3 ---
 www/lychee/Makefile                         | 2 --
 www/microbin/Makefile                       | 3 ---
 www/miniserve/Makefile                      | 3 ---
 www/monolith/Makefile                       | 3 ---
 www/ncgopher/Makefile                       | 1 -
 www/newsboat/Makefile                       | 3 ---
 www/py-adblock/Makefile                     | 1 -
 www/py-nh3/Makefile                         | 3 ---
 www/py-pywry/Makefile                       | 3 ---
 www/reddsaver/Makefile                      | 3 ---
 www/rustypaste-cli/Makefile                 | 1 -
 www/rustypaste/Makefile                     | 1 -
 www/so/Makefile                             | 1 -
 www/sqlpage/Makefile                        | 1 -
 www/stork/Makefile                          | 3 ---
 www/trunk/Makefile                          | 3 ---
 www/tuifeed/Makefile                        | 3 ---
 www/vigil/Makefile                          | 3 ---
 www/wasm-pack/Makefile                      | 3 ---
 www/websocat/Makefile                       | 3 ---
 www/wiki-tui/Makefile                       | 3 ---
 www/xh/Makefile                             | 3 ---
 www/zola/Makefile                           | 1 -
 x11-wm/cosmic-comp/Makefile                 | 1 -
 x11-wm/leftwm/Makefile                      | 5 -----
 x11-wm/niri/Makefile                        | 1 -
 x11/admiral/Makefile                        | 3 ---
 x11/alacritty/Makefile                      | 1 -
 x11/eww/Makefile                            | 3 ---
 x11/inputplug/Makefile                      | 1 -
 x11/rio/Makefile                            | 1 -
 x11/rlaunch/Makefile                        | 3 ---
 x11/shikane/Makefile                        | 3 ---
 x11/windowtolayer/Makefile                  | 3 ---
 x11/wlr-which-key/Makefile                  | 3 ---
 x11/wmfocus/Makefile                        | 3 ---
 x11/xwayland-satellite/Makefile             | 3 ---
 376 files changed, 1020 deletions(-)