2017-01-30 17:46:23 +00:00
|
|
|
%__rustc %{_bindir}/rustc
|
2017-06-23 11:35:18 +00:00
|
|
|
%__rustdoc %{_bindir}/rustdoc
|
2017-01-30 17:46:23 +00:00
|
|
|
|
|
|
|
# Enable optimization, debuginfo, and link hardening.
|
2019-04-23 19:10:38 +00:00
|
|
|
%build_rustflags %{shrink:
|
2019-04-23 19:08:41 +00:00
|
|
|
-Copt-level=3
|
|
|
|
-Cdebuginfo=2
|
|
|
|
-Clink-arg=-Wl,-z,relro,-z,now
|
|
|
|
-Ccodegen-units=1
|
2019-12-03 18:11:20 +00:00
|
|
|
--cap-lints=warn
|
2019-04-23 19:08:41 +00:00
|
|
|
}
|
2017-01-30 17:46:23 +00:00
|
|
|
|
2019-04-23 19:10:38 +00:00
|
|
|
%__global_rustflags %{build_rustflags}
|
|
|
|
|
2017-01-30 17:46:23 +00:00
|
|
|
%__global_rustflags_toml [%{lua:
|
2019-04-23 19:10:38 +00:00
|
|
|
for arg in string.gmatch(rpm.expand("%{build_rustflags}"), "%S+") do
|
2017-01-30 17:46:23 +00:00
|
|
|
print('"' .. arg .. '", ')
|
|
|
|
end}]
|