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.
This commit is contained in:
parent
8f4eab1072
commit
ca4631e1f8
23
llvm.spec
23
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 <tstellar@redhat.com> - 5.0.0-4
|
||||
- Reduce debuginfo size for ARM
|
||||
|
||||
* Tue Oct 10 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-2
|
||||
- Reduce memory usage on ARM by disabling debuginfo and some non-ARM targets.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user