Skip to content

Commit 6b2357d

Browse files
committed
Merge branch 'jb48595' into 'master'
[llvm] Upgrade to LLVM 9.0.1. Use python3 for build. Fixes JB#48595 See merge request mer-core/llvm!6
2 parents eb292fb + 7e3295d commit 6b2357d

File tree

4 files changed

+19
-44
lines changed

4 files changed

+19
-44
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "llvm"]
22
path = llvm
3-
url = https://git.merproject.org/mirror/llvm-project.git
3+
url = https://git.sailfishos.org/mirror/llvm-project.git

llvm

Submodule llvm updated from d0d8eb2 to c1a0a21

rpm/llvm.spec

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
%endif
1212

1313
Name: llvm
14-
Version: 7.0.1
14+
Version: 9.0.1
1515
Release: 0
1616
Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
1717
License: University of Illinois/NCSA Open Source License
1818
Group: Development/Tools
1919
URL: http://llvm.org/
2020
Source: %{version}/%{name}-%{version}.tar.gz
21-
Patch1: nosse4-avx.patch
2221
Requires(post): /sbin/ldconfig
2322
Requires(postun): /sbin/ldconfig
24-
BuildRequires: cmake
25-
BuildRequires: gcc, python
23+
BuildRequires: cmake, ninja
24+
BuildRequires: gcc, python3-base
2625

2726
%description
2827
LLVM is a compiler infrastructure designed for compile-time, link-time, runtime,
@@ -50,28 +49,34 @@ LLVM Header files
5049
mkdir -p build
5150
pushd build
5251

53-
%cmake .. -G "Unix Makefiles" \
52+
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
53+
%global optflags %(echo %{optflags} | sed 's/-g /-g0 /')
54+
55+
%cmake .. -G Ninja \
5456
-DBUILD_SHARED_LIBS:BOOL=OFF \
5557
-DCMAKE_BUILD_TYPE=Release \
58+
-DCMAKE_INSTALL_RPATH=";" \
59+
-DCMAKE_C_FLAGS="%{optflags} -DNDEBUG" \
60+
-DCMAKE_CXX_FLAGS="%{optflags} -DNDEBUG" \
5661
-DLLVM_BUILD_DOCS:BOOL=OFF \
57-
-DLLVM_BUILD_LLVM_DYLIB:BOOL=OFF \
62+
-DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
5863
-DLLVM_BUILD_RUNTIME:BOOL=OFF \
5964
-DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
6065
-DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
6166
-DLLVM_INCLUDE_DIRS:PATH=%{_includedir} \
6267
-DLLVM_INCLUDE_EXAMPLES:BOOL=OFF \
6368
-DLLVM_INCLUDE_TEST:BOOL=OFF \
64-
-DLLVM_LINK_LLVM_DYLIB:BOOL=OFF \
69+
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
70+
-DLLVM_PARALLEL_LINK_JOBS=1 \
6571
-DLLVM_TARGETS_TO_BUILD="%{llvm_targets}" \
6672
-DLLVM_TOOLS_BINARY_DIR:PATH=%{_bindir}
6773

68-
# Jobs limited to 4 to prevent OBS from running out of memory
69-
make -j4
74+
%ninja_build
7075
popd build
7176

7277
%install
7378
rm -rf %{buildroot}
74-
make -C build install/strip DESTDIR=%{buildroot}
79+
%ninja_install -C build
7580

7681
%post -p /sbin/ldconfig
7782

@@ -81,12 +86,14 @@ make -C build install/strip DESTDIR=%{buildroot}
8186
%defattr(-, root, root)
8287
%{_bindir}/*
8388
%{_libdir}/*.so.*
89+
%{_libdir}/libLLVM-*.so
8490
%{_datadir}/opt-viewer
8591

8692
%files devel
8793
%defattr(-, root, root)
8894
%{_libdir}/*.a
8995
%{_libdir}/*.so
96+
%exclude %{_libdir}/libLLVM-*.so
9097
%{_includedir}/llvm
9198
%{_includedir}/llvm-c
9299
%{_libdir}/cmake

rpm/nosse4-avx.patch

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)