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
|
|
|
|
2022-02-22 10:41:46 +00:00
|
|
|
%rustflags_opt_level 3
|
|
|
|
%rustflags_debuginfo 2
|
|
|
|
%rustflags_codegen_units 1
|
|
|
|
|
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:
|
2022-02-22 10:41:46 +00:00
|
|
|
-Copt-level=%rustflags_opt_level
|
|
|
|
-Cdebuginfo=%rustflags_debuginfo
|
|
|
|
-Ccodegen-units=%rustflags_codegen_units
|
2022-02-14 21:12:49 +00:00
|
|
|
-Clink-arg=-Wl,-z,relro
|
|
|
|
-Clink-arg=-Wl,-z,now
|
|
|
|
%{?_package_note_file:-Clink-arg=-Wl,-dT,%{_package_note_file}}
|
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}
|
|
|
|
|
2022-02-22 10:28:52 +00:00
|
|
|
# Currently unused, retained for backwards compatibility.
|
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}]
|