Consolidate 32-bit build compromises.
This commit is contained in:
parent
6501920abb
commit
d7cd45b9e4
25
rust.spec
25
rust.spec
@ -1,6 +1,6 @@
|
||||
Name: rust
|
||||
Version: 1.75.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016)
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
@ -85,9 +85,15 @@ ExclusiveArch: %{rust_arches}
|
||||
%endif
|
||||
|
||||
%if 0%{?__isa_bits} == 32
|
||||
# Disable PGO on 32-bit to reduce build memory
|
||||
# Reduce rustc's own debuginfo and optimizations to conserve 32-bit memory.
|
||||
# e.g. https://github.com/rust-lang/rust/issues/45854
|
||||
%global enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
|
||||
%global enable_rust_opts --set rust.codegen-units-std=1
|
||||
%bcond_with rustc_pgo
|
||||
%else
|
||||
# Build rustc with full debuginfo, CGU=1, ThinLTO, and PGO.
|
||||
%global enable_debuginfo --debuginfo-level=2
|
||||
%global enable_rust_opts --set rust.codegen-units=1 --set rust.lto=thin
|
||||
%bcond_without rustc_pgo
|
||||
%endif
|
||||
|
||||
@ -660,14 +666,6 @@ end}
|
||||
%build
|
||||
%{export_rust_env}
|
||||
|
||||
%ifarch %{arm} %{ix86}
|
||||
# full debuginfo is exhausting memory; just do libstd for now
|
||||
# https://github.com/rust-lang/rust/issues/45854
|
||||
%define enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2
|
||||
%else
|
||||
%define enable_debuginfo --debuginfo-level=2
|
||||
%endif
|
||||
|
||||
# Some builders have relatively little memory for their CPU count.
|
||||
# At least 2GB per CPU is a good rule of thumb for building rustc.
|
||||
ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN)
|
||||
@ -732,8 +730,7 @@ test -r "%{profiler}"
|
||||
--disable-llvm-static-stdcpp \
|
||||
--disable-rpath \
|
||||
%{enable_debuginfo} \
|
||||
--set rust.codegen-units=1 \
|
||||
--set rust.lto=thin \
|
||||
%{enable_rust_opts} \
|
||||
--set build.build-stage=2 \
|
||||
--set build.doc-stage=2 \
|
||||
--set build.install-stage=2 \
|
||||
@ -1052,6 +1049,10 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 30 2024 Josh Stone <jistone@redhat.com> - 1.75.0-3
|
||||
- Consolidate 32-bit build compromises.
|
||||
- Update rust-toolset and add rust-srpm-macros for ELN.
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.75.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user