From dd5bd14efc88cc1b09cc68d1eb2179689a509a67 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 25 Oct 2021 17:18:26 +0000 Subject: [PATCH] Build with Thin LTO Full LTO is too memory intensive for most architectures, so use Thin LTO instead. --- llvm.spec | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/llvm.spec b/llvm.spec index 3498a35..00ca698 100644 --- a/llvm.spec +++ b/llvm.spec @@ -67,7 +67,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -207,15 +207,13 @@ LLVM's modified googletest sources. %build -# Disable LTO on s390x, this causes some test failures: -# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.Authenticated -# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.PATCHPOINT -# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.STACKMAP -# LLVM-Unit :: Target/AArch64/./AArch64Tests/InstSizes.TLSDESC_CALLSEQ -# On X86_64, LTO builds of TableGen crash. This can be reproduced by: -# %%cmake_build --target include/llvm/IR/IntrinsicsAArch64.h -# Because of these failures, lto is disabled for now. +# Disable lto on s390x due to https://bugzilla.redhat.com/show_bug.cgi?id=2017193 +# Disable lto on arm due to https://bugzilla.redhat.com/show_bug.cgi?id=1918924 +%ifarch s390x %{arm} %global _lto_cflags %{nil} +%else +%global _lto_cflags -flto=thin +%endif %ifarch s390 s390x %{arm} %ix86 # Decrease debuginfo verbosity to reduce memory consumption during final library linking @@ -549,6 +547,9 @@ fi %endif %changelog +* Mon Oct 25 2021 Tom Stellard - 13.0.0-6 +- Build with Thin LTO + * Mon Oct 18 2021 Tom Stellard - 13.0.0-5 - Build with clang