Skip to content
Snippets Groups Projects

Build a non-stripped rust-coreutils binary for dh_setup_copyright

Merged Dylan Aïssi requested to merge proposed-updates/daissi/dbgsymbols into apertis/v2024pre
All threads resolved!
5 files
+ 121
0
Compare changes
  • Side-by-side
  • Inline
Files
5
Description: Add a no-optimization build profile to build
a binary compatible with our licensing tooling.
Rust binaries stripped at linking time are smaller than binaries
stripped with dh_strip. Since we want the smaller binary possible for
rust-coreutils, we strip debug symbols at linking time, but that
means dh_setup_copyright is then not able to extract required data.
As a workaround we build here a non-stripped binary only for
dh_setup_copyright.
Author: Dylan Aïssi <dylan.aissi@collabora.com>
Forwarded: not-needed
Bug-Apertis: https://gitlab.apertis.org/infrastructure/apertis-issues/-/issues/431
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -431,3 +431,9 @@
lto = true
opt-level = "z"
panic = "abort"
+
+[profile.noopt]
+inherits = "release"
+lto = false
+opt-level = 3
+panic = "unwind"
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -4,13 +4,12 @@
PROFILE ?= debug
MULTICALL ?= n
INSTALL ?= install
-ifneq (,$(filter install, $(MAKECMDGOALS)))
-override PROFILE:=release
-endif
PROFILE_CMD :=
ifeq ($(PROFILE),release)
PROFILE_CMD = --release
+else
+ PROFILE_CMD = --profile $(PROFILE)
endif
RM := rm -rf
Loading