Enable debuginfo

Resolves: #2167216
Ref: https://github.com/containers/aardvark-dns/pull/290

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2023-02-07 17:16:43 +05:30
parent 23a046540c
commit 2dce5e11e8

View File

@ -2,7 +2,16 @@
# using vendored deps # using vendored deps
# debuginfo doesn't work yet # 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} %global debug_package %{nil}
%endif
%global built_tag v1.5.0 %global built_tag v1.5.0
%global built_tag_strip %(b=%{built_tag}; echo ${b:1}) %global built_tag_strip %(b=%{built_tag}; echo ${b:1})
@ -145,7 +154,9 @@ directory = "vendor"
EOF EOF
%build %build
%{__make} build %{__cargo} build --release
mkdir -p bin
cp target/release/%{name} bin/
%install %install
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install