diff --git a/rust.changes b/rust.changes index 05c12a3..29b139a 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 27 02:38:54 UTC 2019 - Luke Jones + +- Move export vars directly to where used. +- Change codegen units to 2 for Arm and x86 builds in attempt to + reduce memory use by LLVM. + ------------------------------------------------------------------- Wed Feb 27 02:12:17 UTC 2019 - Federico Mena Quintero diff --git a/rust.spec b/rust.spec index 12ca232..a85b739 100644 --- a/rust.spec +++ b/rust.spec @@ -72,9 +72,12 @@ %bcond_without bundled_llvm %endif +# enable the --with-rust_bootstrap flag +%bcond_with rust_bootstrap + # Debuginfo can exhaust memory on these architecture workers %ifarch %{arm} %{ix86} -%define codegen_units --set rust.codegen-units=4 +%define codegen_units --set rust.codegen-units=2 %define debug_info --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines %else %define codegen_units --set rust.codegen-units=0 @@ -82,23 +85,7 @@ %endif # Use hardening ldflags. %global rustflags -Clink-arg=-Wl,-z,relro,-z,now -# eliminate complain from RPMlint -%global nocomplain CPPFLAGS="%{optflags}" -# Cargo use system libs if not bootstrapping -# restircted only to libgit due to version changes causing with cargo rpm deps -%global cargo_ssh LIBSSH2_SYS_USE_PKG_CONFIG=1 -%if !%with rust_bootstrap -%global cargo_git LIBGIT2_SYS_USE_PKG_CONFIG=1 -# Must be exported before running x.py in both build and install -# If the environments between build and install and different, -# everything will be rebuilt during installation! -%global rustc_flags RUSTFLAGS="%{rustflags}" -%else -%global rustc_flags RUSTFLAGS="%{rustflags}" -%endif -# enable the --with-rust_bootstrap flag -%bcond_with rust_bootstrap Name: rust Version: 1.32.0 @@ -422,12 +409,15 @@ fi # in sync! # If the environments between build and install and different, # everything will be rebuilt during installation! -export %{rustc_flags} +export RUSTFLAGS="%{rustflags}" +# Cargo use system libs if not bootstrapping +# restircted only to libgit due to version changes causing with cargo rpm deps %if !%with rust_bootstrap -export %{cargo_git} +export LIBGIT2_SYS_USE_PKG_CONFIG=1 %endif -export %{cargo_ssh} -export %{nocomplain} +export LIBSSH2_SYS_USE_PKG_CONFIG=1 +# eliminate complain from RPMlint +export CPPFLAGS="%{optflags}" ./x.py build -v ./x.py doc -v @@ -438,12 +428,15 @@ export %{nocomplain} # in sync! # If the environments between build and install and different, # everything will be rebuilt during installation! -export %{rustc_flags} +export RUSTFLAGS="%{rustflags}" +# Cargo use system libs if not bootstrapping +# restircted only to libgit due to version changes causing with cargo rpm deps %if !%with rust_bootstrap -export %{cargo_git} +export LIBGIT2_SYS_USE_PKG_CONFIG=1 %endif -export %{cargo_ssh} -export %{nocomplain} +export LIBSSH2_SYS_USE_PKG_CONFIG=1 +# eliminate complain from RPMlint +export CPPFLAGS="%{optflags}" DESTDIR=%{buildroot} ./x.py install DESTDIR=%{buildroot} ./x.py install src