macros: Pass -Ccodegen-units=1 in RUSTFLAGS
This has good impact on performance and binary size at cost of compilation time. As nice side effect, it fixes bug which breaks compilation of binaries in Fedora Rawhide. For example, ffsend binary went from 107M to 70M. References: https://bugzilla.redhat.com/show_bug.cgi?id=1701339 Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
bbd8cb71d3
commit
3076bbaa3a
1 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,12 @@
|
||||||
%__rustdoc %{_bindir}/rustdoc
|
%__rustdoc %{_bindir}/rustdoc
|
||||||
|
|
||||||
# Enable optimization, debuginfo, and link hardening.
|
# Enable optimization, debuginfo, and link hardening.
|
||||||
%__global_rustflags -Copt-level=3 -Cdebuginfo=2 -Clink-arg=-Wl,-z,relro,-z,now
|
%__global_rustflags %{shrink:
|
||||||
|
-Copt-level=3
|
||||||
|
-Cdebuginfo=2
|
||||||
|
-Clink-arg=-Wl,-z,relro,-z,now
|
||||||
|
-Ccodegen-units=1
|
||||||
|
}
|
||||||
|
|
||||||
%__global_rustflags_toml [%{lua:
|
%__global_rustflags_toml [%{lua:
|
||||||
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
|
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
|
||||||
|
|
Loading…
Reference in a new issue