]> git.pld-linux.org Git - packages/llvm.git/blobdiff - llvm.spec
fix lowmem bcond
[packages/llvm.git] / llvm.spec
index c54d36d7e6ef8e0b3c65731f36fa636b6cb7520e..ddbd5cdfceb91b3230fdd6f3b0cbe1ac9b3003e0 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
 %bcond_with    cxxmodules      # C++20 modules (requires support in bootstrap compiler)
 %bcond_with    apidocs         # doxygen docs (HUGE, so they are not built by default)
 %bcond_with    tests           # run tests
+%bcond_with    lowmem          # lower memory requirements
 
 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
 %undefine      with_ocaml
 %endif
 
+%ifarch armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl
+%undefine      with_rt
+%endif
+
+%ifarch %{arm} aarch64
+%define                with_lowmem             1
+%endif
+
 Summary:       The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
 Summary(pl.UTF-8):     Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
 Name:          llvm
@@ -58,6 +67,7 @@ Patch4:               cmake-buildtype.patch
 Patch5:                %{name}-ocaml-shared.patch
 URL:           http://llvm.org/
 BuildRequires: bash
+BuildRequires: binutils-devel
 BuildRequires: bison
 BuildRequires: cmake >= 3.4.3
 BuildRequires: flex
@@ -570,6 +580,12 @@ install -d build
 cd build
 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
 
+%if %{with lowmem}
+export CFLAGS="%{rpmcflags} -g0"
+export CXXFLAGS="%{rpmcxxflags} -g0"
+export LDFLAGS="%{rpmldflags} -Wl,--reduce-memory-overheads"
+%endif
+
 %cmake .. \
        -DBUILD_SHARED_LIBS:BOOL=OFF \
        -DENABLE_LINKER_BUILD_ID:BOOL=ON \
@@ -596,6 +612,9 @@ CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
 %endif
        -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
        -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=%{_target_platform} \
+%if %{with lowmem}
+       -DLLVM_PARALLEL_LINK_JOBS:STRING=1 \
+%endif
        -DSPHINX_WARNINGS_AS_ERRORS=OFF
 
 %{__make} \
This page took 0.041901 seconds and 4 git commands to generate.