11
11
%endif
12
12
13
13
Name: llvm
14
- Version: 7 .0.1
14
+ Version: 9 .0.1
15
15
Release: 0
16
16
Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
17
17
License: University of Illinois/NCSA Open Source License
18
18
Group: Development/Tools
19
19
URL: http://llvm.org/
20
20
Source: %{version }/%{name }-%{version }.tar.gz
21
- Patch1: nosse4-avx.patch
22
21
Requires(post): /sbin/ldconfig
23
22
Requires(postun): /sbin/ldconfig
24
- BuildRequires: cmake
25
- BuildRequires: gcc, python
23
+ BuildRequires: cmake, ninja
24
+ BuildRequires: gcc, python3-base
26
25
27
26
%description
28
27
LLVM is a compiler infrastructure designed for compile-time, link-time, runtime,
@@ -50,28 +49,34 @@ LLVM Header files
50
49
mkdir -p build
51
50
pushd build
52
51
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 \
54
56
-DBUILD_SHARED_LIBS:BOOL= OFF \
55
57
-DCMAKE_BUILD_TYPE= Release \
58
+ -DCMAKE_INSTALL_RPATH= ";" \
59
+ -DCMAKE_C_FLAGS= "%{optflags } -DNDEBUG" \
60
+ -DCMAKE_CXX_FLAGS= "%{optflags } -DNDEBUG" \
56
61
-DLLVM_BUILD_DOCS:BOOL= OFF \
57
- -DLLVM_BUILD_LLVM_DYLIB:BOOL= OFF \
62
+ -DLLVM_BUILD_LLVM_DYLIB:BOOL= ON \
58
63
-DLLVM_BUILD_RUNTIME:BOOL= OFF \
59
64
-DLLVM_ENABLE_ASSERTIONS:BOOL= OFF \
60
65
-DLLVM_INCLUDE_BENCHMARKS:BOOL= OFF \
61
66
-DLLVM_INCLUDE_DIRS:PATH= %{_includedir } \
62
67
-DLLVM_INCLUDE_EXAMPLES:BOOL= OFF \
63
68
-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 \
65
71
-DLLVM_TARGETS_TO_BUILD= "%{llvm_targets }" \
66
72
-DLLVM_TOOLS_BINARY_DIR:PATH= %{_bindir }
67
73
68
- # Jobs limited to 4 to prevent OBS from running out of memory
69
- make -j4
74
+ %ninja_build
70
75
popd build
71
76
72
77
%install
73
78
rm -rf %{buildroot }
74
- make -C build install/strip DESTDIR=%{ buildroot }
79
+ % ninja_install -C build
75
80
76
81
%post -p /sbin/ldconfig
77
82
@@ -81,12 +86,14 @@ make -C build install/strip DESTDIR=%{buildroot}
81
86
%defattr(-, root, root)
82
87
%{_bindir }/*
83
88
%{_libdir }/* .so.*
89
+ %{_libdir }/libLLVM-* .so
84
90
%{_datadir }/opt-viewer
85
91
86
92
%files devel
87
93
%defattr(-, root, root)
88
94
%{_libdir }/* .a
89
95
%{_libdir }/* .so
96
+ %exclude %{_libdir }/libLLVM-* .so
90
97
%{_includedir }/llvm
91
98
%{_includedir }/llvm-c
92
99
%{_libdir }/cmake
0 commit comments