Compare commits

...

2 Commits

Author SHA1 Message Date
Josh Stone 844e68ae18 Remove macro flags that aren't supported in el8 rpm 2024-01-20 04:34:21 +00:00
Josh Stone 170b79df1d Reduce rustc's own optimization on i686
Resolves: RHEL-12964
2024-01-08 12:47:05 -08:00
3 changed files with 6 additions and 11 deletions

2
.rust.metadata Normal file
View File

@ -0,0 +1,2 @@
9ad7bb54dc9572c103b855cdcc823addbb34d15d rustc-1.75.0-src.tar.xz
55eaa32c99cc8ec970f2db2d340a605724589f9b wasi-libc-bd950eb128bff337153de217b11270f948d04bb4.tar.gz

View File

@ -34,20 +34,12 @@
# -Copt-level: set optimization level (default: highest optimization level)
# -Cdebuginfo: set debuginfo verbosity (default: full debug information)
# -Ccodegen-units: set number of parallel code generation units (default: 1)
# -Cforce-frame-pointers: force inclusion of frame pointers (default: enabled
# on x86_64 and aarch64 on Fedora 37+)
#
# Additionally, some linker flags are set which correspond to the default
# Fedora compiler flags for hardening and for embedding package versions into
# compiled binaries.
#
# ref. https://doc.rust-lang.org/rustc/codegen-options/index.html
%build_rustflags %{shrink:
-Copt-level=%rustflags_opt_level
-Cdebuginfo=%rustflags_debuginfo
-Ccodegen-units=%rustflags_codegen_units
%{expr:0%{?_include_frame_pointers} && ("%{_arch}" != "ppc64le" && "%{_arch}" != "s390x" && "%{_arch}" != "i386") ? "-Cforce-frame-pointers=yes" : ""}
%[0%{?_package_note_status} ? "-Clink-arg=%_package_note_flags" : ""]
}
# __cargo_common_opts: common command line flags for cargo

View File

@ -656,11 +656,13 @@ end}
%{export_rust_env}
%ifarch %{arm} %{ix86}
# full debuginfo is exhausting memory; just do libstd for now
# full debuginfo and compiler opts are 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
%define enable_rust_opts --set rust.codegen-units-std=1
%else
%define enable_debuginfo --debuginfo-level=2
%define enable_rust_opts --set rust.codegen-units=1 --set rust.lto=thin
%endif
# Some builders have relatively little memory for their CPU count.
@ -727,8 +729,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 \