Accepting request 679674 from home:luke_nukem:branches:devel:languages:rust
- 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. OBS-URL: https://build.opensuse.org/request/show/679674 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=191
This commit is contained in:
parent
2292765355
commit
88a25a2cd1
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 27 02:38:54 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
|
||||
|
||||
- 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 <federico@suse.com>
|
||||
|
||||
|
43
rust.spec
43
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
|
||||
|
Loading…
Reference in New Issue
Block a user