]> git.pld-linux.org Git - packages/llvm.git/blobdiff - llvm.spec
fix lowmem bcond
[packages/llvm.git] / llvm.spec
index f0d4ccfb22bf2d393d35a57fd1c4ef86f3b48998..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
-Version:       10.0.1
+Version:       11.0.0
 Release:       1
 License:       University of Illinois/NCSA Open Source License
 Group:         Development/Languages
 #Source0Download: https://github.com/llvm/llvm-project/releases/
 Source0:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
-# Source0-md5: 71c68c526cbbf1674b5aafc5542b336c
+# Source0-md5: 85844102335b2e01b3c64b6734fb56f2
 Source1:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
-# Source1-md5: 6c8b56f531876fd24e06257a2d8ce422
+# Source1-md5: d8fbc5b1d27f44922cfbbf199d0bab78
 Source2:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
-# Source2-md5: 970835d14e9c08a68c4b2ff3931bada7
+# Source2-md5: 182511f9ba2c83b9d3c934501d48bee9
 Source3:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
-# Source3-md5: 0dddd62dd96ba97ccf075fc3ca086024
+# Source3-md5: f36e38d039721555cd41e8687d577094
 Source4:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
-# Source4-md5: 263ad3980c19012719b14333b69c108e
+# Source4-md5: 314d2db9d05ff6bf006ce3496de47b53
 Source5:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
-# Source5-md5: 251388aa2f5fbd472acc9735b3386e59
+# Source5-md5: 8f7c4942b26c91de2b90dc85e38590d1
 Source6:       https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
-# Source6-md5: c8f364fbb129e47ef2793c317561449a
+# Source6-md5: b2f9f55fd275a384f0dfbbc41242d52e
 Patch1:                %{name}-pld.patch
 Patch2:                %{name}-python-modules.patch
 Patch3:                x32-gcc-toolchain.patch
 Patch4:                cmake-buildtype.patch
 Patch5:                %{name}-ocaml-shared.patch
-Patch6:                lld-sphinx2.patch
 URL:           http://llvm.org/
 BuildRequires: bash
+BuildRequires: binutils-devel
 BuildRequires: bison
 BuildRequires: cmake >= 3.4.3
 BuildRequires: flex
@@ -116,7 +125,7 @@ BuildRequires:      libstdc++-multilib-64-devel
 %endif
 %if %{with lldb}
 BuildRequires: epydoc
-%ifarch i386 i486
+%ifarch i386 i486 %{arm}
 BuildRequires: libatomic-devel
 %endif
 BuildRequires: libxml2-devel >= 2
@@ -140,7 +149,7 @@ Requires:   %{name}-libs = %{version}-%{release}
 ExcludeArch:   ppc64
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                abi     10
+%define                abi     11
 %define                _sysconfdir     /etc/%{name}
 
 %define                specflags_ppc   -fno-var-tracking-assignments
@@ -553,7 +562,6 @@ Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 
 grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{
        s,^#!.*bin/env python,#!%{__python},
@@ -572,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 \
@@ -597,6 +611,10 @@ CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
        -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
 %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} \
@@ -723,6 +741,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/llvm-elfabi
 %attr(755,root,root) %{_bindir}/llvm-exegesis
 %attr(755,root,root) %{_bindir}/llvm-extract
+%attr(755,root,root) %{_bindir}/llvm-gsymutil
 %attr(755,root,root) %{_bindir}/llvm-ifs
 %attr(755,root,root) %{_bindir}/llvm-install-name-tool
 %attr(755,root,root) %{_bindir}/llvm-jitlink
@@ -733,6 +752,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/llvm-lto2
 %attr(755,root,root) %{_bindir}/llvm-mc
 %attr(755,root,root) %{_bindir}/llvm-mca
+%attr(755,root,root) %{_bindir}/llvm-ml
 %attr(755,root,root) %{_bindir}/llvm-modextract
 %attr(755,root,root) %{_bindir}/llvm-mt
 %attr(755,root,root) %{_bindir}/llvm-nm
@@ -807,10 +827,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
 # non-soname symlink
 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
-%attr(755,root,root) %ghost %{_libdir}/libLTO.so.10
+%attr(755,root,root) %ghost %{_libdir}/libLTO.so.11
 %attr(755,root,root) %{_libdir}/LLVMgold.so
-%attr(755,root,root) %{_libdir}/libRemarks.so.10
-%attr(755,root,root) %{_libdir}/libclang-cpp.so.10
+%attr(755,root,root) %{_libdir}/libRemarks.so.11
+%attr(755,root,root) %{_libdir}/libclang-cpp.so.11
 
 %files devel
 %defattr(644,root,root,755)
@@ -862,7 +882,6 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/clang-cpp
 %attr(755,root,root) %{_bindir}/clang-doc
 %attr(755,root,root) %{_bindir}/clang-format
-%attr(755,root,root) %{_bindir}/clang-import-test
 %attr(755,root,root) %{_bindir}/clang-offload-bundler
 %attr(755,root,root) %{_bindir}/clang-offload-wrapper
 %attr(755,root,root) %{_bindir}/git-clang-format
@@ -966,6 +985,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libclang*.a
 %{_includedir}/clang
 %{_includedir}/clang-c
+%{_includedir}/clang-tidy
 %{_libdir}/cmake/clang
 
 %files -n clang-doc
@@ -1016,6 +1036,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %{_libdir}/liblld[ACDEHMRWXY]*.a
 %{_includedir}/lld
+%{_libdir}/cmake/lld
 
 %if %{with lldb}
 %files -n lldb
@@ -1026,8 +1047,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/lldb-server
 %attr(755,root,root) %{_bindir}/lldb-vscode
 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
-%attr(755,root,root) %ghost %{_libdir}/liblldb.so.10
-%attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.10
+%attr(755,root,root) %ghost %{_libdir}/liblldb.so.11
+%attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.11
 %dir %{py_sitedir}/lldb
 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
 %{py_sitedir}/lldb/formatters
This page took 0.129358 seconds and 4 git commands to generate.