From d7cd45b9e460241158a16dc308c5026b649cbb5d Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 9 Jan 2024 13:46:24 -0800 Subject: [PATCH] Consolidate 32-bit build compromises. --- rust.spec | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/rust.spec b/rust.spec index d5ddc9b..6c02679 100644 --- a/rust.spec +++ b/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 - 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 - 1.75.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild