Use RHEL LTO flags in ELN builds

These constraints are needed primarily for RHEL and CS builders.
This commit is contained in:
Yaakov Selkowitz 2024-02-06 18:41:17 -05:00
parent b2bda922a0
commit 7957a7652b

View File

@ -335,6 +335,13 @@ rm test/CodeGen/profile-filter.c
%global _lto_cflags %nil
%endif
%if 0%{?rhel}
%ifarch %{ix86}
# Linking libclang.so goes out of memory even with ThinLTO and a single link job.
%global _lto_cflags %nil
%endif
%endif
%ifarch s390 s390x aarch64 %ix86 ppc64le
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')