mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-28 02:34:52 +00:00
Clean up the lto_cflags mess
We were defining lto_cflags in three places. It looks like on aarch64 nil won (LTO disabled), while on other architectures `-flto=thin` won. I think on rawhide, this means that we're currently shipping bitcode in static archives, because the required `-ffat-lto-objects` option from redhat-rpm-config is missing. Resolve this by leaving the option at its default value -- if enabling it on aarch64 causes issues, we can disable it just there again. Also reenable the LLVM_UNITTEST_LINK_FLAGS option, which should reduce the amount of time LTO takes.
This commit is contained in:
parent
c422c5daf7
commit
3ddc01eec2
2 changed files with 0 additions and 14 deletions
|
@ -1,8 +1,3 @@
|
|||
# Disable LTO to speed up builds
|
||||
%if %{with snapshot_build}
|
||||
%global _lto_cflags %nil
|
||||
%endif
|
||||
|
||||
# TODO(kkleine): In clang we had this %ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le
|
||||
%ifarch s390 s390x %{arm} %ix86
|
||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||
|
@ -17,11 +12,6 @@ export ASMFLAGS="%{build_cflags}"
|
|||
|
||||
#region BEGIN: COPIED FROM CLANG
|
||||
|
||||
# And disable LTO on AArch64 entirely.
|
||||
%ifarch aarch64
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
# TODO(kkleine): Make sure the paths actually work. I have the feeling this needs adjustment
|
||||
pwd
|
||||
%if 0%{?__isa_bits} == 64
|
||||
|
@ -203,9 +193,7 @@ cd llvm
|
|||
%ifarch x86_64
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -Wl,-z,cet-report=error" \
|
||||
%endif
|
||||
%if %{without snapshot_build}
|
||||
-DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0"
|
||||
%endif
|
||||
|
||||
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
|
||||
# are no other compile jobs running. This will help reduce OOM errors on the
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
%global src_tarball_dir llvm-project-%{llvm_snapshot_git_revision}
|
||||
%endif
|
||||
|
||||
%global _lto_cflags -flto=thin
|
||||
|
||||
#region LLVM globals
|
||||
|
||||
%if %{with compat_build}
|
||||
|
|
Loading…
Reference in a new issue