From ca4631e1f82de5be2b6b3ce5e0366c3a79cdf79b Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 4 Nov 2017 01:38:36 +0000 Subject: [PATCH] Reduce debuginfo size for ARM This fixes the previous attempt to disable debuginfo, which left debuginfo enabled and disabled stripping it from the libraries. libLLVM.so was almost 1GB in the ARM builds, but now is about 47 MB. --- llvm.spec | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/llvm.spec b/llvm.spec index dc0bfa3..ba73a95 100644 --- a/llvm.spec +++ b/llvm.spec @@ -12,7 +12,7 @@ Name: llvm Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 3%{?dist} +Release: 4%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -97,27 +97,17 @@ for f in `grep -Rl 'XFAIL.\+arm' test/ExecutionEngine `; do rm $f; done mkdir -p _build cd _build -%ifarch s390 +%ifarch s390 %{arm} # Decrease debuginfo verbosity to reduce memory consumption during final library linking %global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %endif -# There is not enough memory on the ARM builders to build with debuginfo. -# We also enable less targets on ARM to save memory. -%ifarch %{arm} -%global debug_package %{nil} -%endif - # force off shared libs as cmake macros turns it on. %cmake .. \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -%ifarch %{arm} - -DCMAKE_BUILD_TYPE=Release \ -%else -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -%endif -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-Bsymbolic -static-libstdc++" \ -%ifarch s390 +%ifarch s390 %{arm} -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ %endif @@ -127,11 +117,7 @@ cd _build -DLLVM_LIBDIR_SUFFIX= \ %endif \ -%ifarch %{arm} - -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;NVPTX;AArch64;ARM;BPF" \ -%else -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \ -%endif -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ -DLLVM_ENABLE_ZLIB:BOOL=ON \ -DLLVM_ENABLE_FFI:BOOL=ON \ @@ -229,6 +215,9 @@ fi %{_libdir}/cmake/llvm/LLVMStaticExports.cmake %changelog +* Fri Nov 03 2017 Tom Stellard - 5.0.0-4 +- Reduce debuginfo size for ARM + * Tue Oct 10 2017 Tom Stellard - 5.0.0-2 - Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets.