Merge #179 Include linker flags for package note in %build_rustflags
This commit is contained in:
commit
3781ce3b33
2 changed files with 4 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
||||||
# it never writes to ~/.cargo during rpmbuild.
|
# it never writes to ~/.cargo during rpmbuild.
|
||||||
# We also need RUSTC_BOOTSTRAP since we use -Z avoid-dev-deps
|
# We also need RUSTC_BOOTSTRAP since we use -Z avoid-dev-deps
|
||||||
# until it gets stabilized: https://github.com/rust-lang/cargo/issues/5133
|
# until it gets stabilized: https://github.com/rust-lang/cargo/issues/5133
|
||||||
%__cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 %{_bindir}/cargo
|
%__cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' %{_bindir}/cargo
|
||||||
%__cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps
|
%__cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps
|
||||||
%__cargo_inspector %{_bindir}/cargo-inspector
|
%__cargo_inspector %{_bindir}/cargo-inspector
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ cat > .cargo/config << EOF \
|
||||||
[build]\
|
[build]\
|
||||||
rustc = "%{__rustc}"\
|
rustc = "%{__rustc}"\
|
||||||
rustdoc = "%{__rustdoc}"\
|
rustdoc = "%{__rustdoc}"\
|
||||||
rustflags = %{__global_rustflags_toml}\
|
|
||||||
\
|
\
|
||||||
[env]\
|
[env]\
|
||||||
CFLAGS = "%{build_cflags}"\
|
CFLAGS = "%{build_cflags}"\
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
%build_rustflags %{shrink:
|
%build_rustflags %{shrink:
|
||||||
-Copt-level=3
|
-Copt-level=3
|
||||||
-Cdebuginfo=2
|
-Cdebuginfo=2
|
||||||
-Clink-arg=-Wl,-z,relro,-z,now
|
-Clink-arg=-Wl,-z,relro
|
||||||
|
-Clink-arg=-Wl,-z,now
|
||||||
|
%{?_package_note_file:-Clink-arg=-Wl,-dT,%{_package_note_file}}
|
||||||
-Ccodegen-units=1
|
-Ccodegen-units=1
|
||||||
--cap-lints=warn
|
--cap-lints=warn
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue