From 7957a7652b5a3001daaac5419fbd4bb07749fb6c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 6 Feb 2024 18:41:17 -0500 Subject: [PATCH] Use RHEL LTO flags in ELN builds These constraints are needed primarily for RHEL and CS builders. --- clang.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clang.spec b/clang.spec index 32fae34..ddeede0 100644 --- a/clang.spec +++ b/clang.spec @@ -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 /')