macros: Use %{build_rustflags} convention

But keep %__global_rustflags around for compatibility.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2019-04-23 21:10:38 +02:00
parent 3076bbaa3a
commit ecc850755e
No known key found for this signature in database
GPG key ID: 695714BD1BBC5F4C

View file

@ -2,14 +2,16 @@
%__rustdoc %{_bindir}/rustdoc
# Enable optimization, debuginfo, and link hardening.
%__global_rustflags %{shrink:
%build_rustflags %{shrink:
-Copt-level=3
-Cdebuginfo=2
-Clink-arg=-Wl,-z,relro,-z,now
-Ccodegen-units=1
}
%__global_rustflags %{build_rustflags}
%__global_rustflags_toml [%{lua:
for arg in string.gmatch(rpm.expand("%{__global_rustflags}"), "%S+") do
for arg in string.gmatch(rpm.expand("%{build_rustflags}"), "%S+") do
print('"' .. arg .. '", ')
end}]