From 2dce5e11e8d0535a4fcac05ac226373f31e2aa1a Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 7 Feb 2023 17:16:43 +0530 Subject: [PATCH] Enable debuginfo Resolves: #2167216 Ref: https://github.com/containers/aardvark-dns/pull/290 Signed-off-by: Lokesh Mandvekar --- aardvark-dns.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/aardvark-dns.spec b/aardvark-dns.spec index c36f05a..d3746d7 100644 --- a/aardvark-dns.spec +++ b/aardvark-dns.spec @@ -2,7 +2,16 @@ # using vendored deps # debuginfo doesn't work yet +%global with_debug 1 + +%define rust_buildflags -Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now --cap-lints=warn + +%if 0%{?with_debug} +%global _find_debuginfo_dwz_opts %{nil} +%global _dwz_low_mem_die_limit 0 +%else %global debug_package %{nil} +%endif %global built_tag v1.5.0 %global built_tag_strip %(b=%{built_tag}; echo ${b:1}) @@ -145,7 +154,9 @@ directory = "vendor" EOF %build -%{__make} build +%{__cargo} build --release +mkdir -p bin +cp target/release/%{name} bin/ %install %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install