diff --git a/rust.spec b/rust.spec index 390db43..d46d6e9 100644 --- a/rust.spec +++ b/rust.spec @@ -78,7 +78,7 @@ # Debuginfo can exhaust memory on these architecture workers %ifarch %{arm} %{ix86} -%define codegen_units --set rust.codegen-units=2 +%define codegen_units --set rust.codegen-units=4 %define debug_info --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines %else %define codegen_units --set rust.codegen-units=0 @@ -86,9 +86,11 @@ %endif # Use hardening ldflags. %global rustflags -Clink-arg=-Wl,-z,relro,-z,now -# Cargo use system libs +# Cargo use system libs if not bootstrapping +%if !%with rust_bootstrap %global cargo_git LIBGIT2_SYS_USE_PKG_CONFIG=1 %global cargo_ssh LIBSSH2_SYS_USE_PKG_CONFIG=1 +%endif # eliminate complain from RPMlint %global nocomplain CPPFLAGS="%{optflags}" @@ -142,8 +144,8 @@ ExclusiveArch: x86_64 %{arm} aarch64 ppc64 ppc64le s390x %{ix86} %ifarch %{ix86} ExclusiveArch: i686 %endif +# Reall LLVM minimum version should be 7.x, but rust has a fallback mode %if !%with bundled_llvm -# LLVM gives incorrect C++ flags for GCC BuildRequires: llvm-devel >= 6.0 %endif %if !%with rust_bootstrap