]>
Commit | Line | Data |
---|---|---|
30b45f1a JR |
1 | # |
2 | # NOTE: | |
3 | # - normal build (x86_64) requires about 80 GB of disk space | |
4 | # | |
6df3b432 JB |
5 | # TODO: |
6 | # - move and package: | |
7 | # %{_datadir}/clang/clang-format-sublime.py - sublime plugin | |
5013c7ea JB |
8 | # %{_datadir}/clang/clang-format.el - clang tools emacs integration |
9 | # %{_datadir}/clang/clang-include-fixer.el | |
10 | # %{_datadir}/clang/clang-rename.el | |
6df3b432 | 11 | # - no content in doc package (it used to contain parts of clang apidocs and some examples) |
6c2b1a44 | 12 | # - system isl in polly? |
90b20139 | 13 | # - dependencies and files for lua module |
970c3a73 | 14 | # %{_libdir}/lua/5.3/lldb.so |
90b20139 | 15 | # - figure out whether we need obj.MLIRCAPIIR files |
313f7f73 JP |
16 | # - cmake dependencies mess (LLVMExports.cmake appears to require all -devels): |
17 | # with llvm-devel and spirv-tools-devel installed but without llvm-mlir (or other packages): | |
18 | # $ cat CMakeLists.txt | |
19 | # find_package(LLVM) | |
20 | # find_package(SPIRV-Tools) | |
21 | # $ cmake -B build | |
22 | # ... | |
23 | # The imported target "mlir-tblgen" references the file | |
24 | # | |
25 | # "/usr/bin/mlir-tblgen" | |
26 | # | |
27 | # but this file does not exist. Possible reasons include: | |
28 | # ... | |
bc88141a | 29 | # |
9556f4c9 | 30 | # Conditional build: |
a531db5e | 31 | %bcond_without lldb # LLDB debugger |
d27b2b77 | 32 | %bcond_without mlir # MLIR libraries and tools (required for Flang) |
20451c6c | 33 | %bcond_with flang # Flang (Fortran18) compiler (heavy memory requirements during build) |
a531db5e JP |
34 | %bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization |
35 | %bcond_without rt # compiler-rt libraries | |
36 | %bcond_without multilib # compiler-rt multilib libraries | |
37 | %bcond_without ocaml # OCaml binding | |
38 | %bcond_without z3 # Z3 constraint solver support in Clang Static Analyzer | |
39 | %bcond_without doc # HTML docs and man pages | |
40 | %bcond_without target_aarch64 # AArch64 target support | |
41 | %bcond_without target_amdgpu # AMDGPU target support | |
42 | %bcond_without target_arm # ARM target support | |
43 | %bcond_without target_avr # AVR target support | |
44 | %bcond_without target_bpf # BPF target support | |
45 | %bcond_without target_hexagon # Hexagon target support | |
46 | %bcond_without target_lanai # Lanai target support | |
47 | %bcond_without target_mips # Mips target support | |
48 | %bcond_without target_msp430 # MSP430 target support | |
49 | %bcond_without target_nvptx # NVPTX target support | |
50 | %bcond_without target_powerpc # PowerPC target support | |
51 | %bcond_without target_riscv # RISCV target support | |
52 | %bcond_without target_sparc # Sparc target support | |
53 | %bcond_without target_systemz # SystemZ target support | |
90b20139 | 54 | %bcond_without target_ve # VE target support |
a531db5e JP |
55 | %bcond_without target_webassembly # WebAssembly target support |
56 | %bcond_without target_x86 # X86 target support | |
57 | %bcond_without target_xcore # XCore target support | |
a531db5e JP |
58 | %bcond_with cxxmodules # C++20 modules (requires support in bootstrap compiler) |
59 | %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default) | |
60 | %bcond_with tests # run tests | |
61 | %bcond_with lowmem # lower memory requirements | |
9556f4c9 | 62 | |
4ba3b2b3 | 63 | # No ocaml on other arches or no native ocaml (required for ocaml-ctypes) |
5013c7ea | 64 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
9556f4c9 ER |
65 | %undefine with_ocaml |
66 | %endif | |
67 | ||
bdd7e0f7 JP |
68 | %ifarch armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl |
69 | %undefine with_rt | |
70 | %endif | |
71 | ||
1431eb62 | 72 | %ifarch %{arm} aarch64 |
c377e543 | 73 | %define with_lowmem 1 |
1431eb62 JP |
74 | %endif |
75 | ||
90b20139 | 76 | %define targets_to_build %{?with_target_aarch64:AArch64;}%{?with_target_amdgpu:AMDGPU;}%{?with_target_arm:ARM;}%{?with_target_avr:AVR;}%{?with_target_bpf:BPF;}%{?with_target_hexagon:Hexagon;}%{?with_target_lanai:Lanai;}%{?with_target_mips:Mips;}%{?with_target_msp430:MSP430;}%{?with_target_nvptx:NVPTX;}%{?with_target_powerpc:PowerPC;}%{?with_target_riscv:RISCV;}%{?with_target_sparc:Sparc;}%{?with_target_systemz:SystemZ;}%{?with_target_ve:VE;}%{?with_target_webassembly:WebAssembly;}%{?with_target_x86:X86;}%{?with_target_xcore:XCore;} |
a531db5e | 77 | |
d27b2b77 JB |
78 | %if %{without mlir} |
79 | %undefine with_flang | |
80 | %endif | |
81 | ||
aa11c230 | 82 | Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure) |
2326a99f | 83 | Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego) |
aa11c230 | 84 | Name: llvm |
0fd19552 | 85 | Version: 15.0.2 |
970c3a73 | 86 | Release: 1 |
77d2fdeb | 87 | License: Apache 2.0 with LLVM exceptions |
aa11c230 | 88 | Group: Development/Languages |
44d18de7 JB |
89 | #Source0Download: https://github.com/llvm/llvm-project/releases/ |
90 | Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz | |
0fd19552 | 91 | # Source0-md5: e3a27e5cf58b146cfd2e5c9755030298 |
44d18de7 | 92 | Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz |
0fd19552 | 93 | # Source1-md5: f2679a17d6be9d1a2298f546c0b4e844 |
44d18de7 | 94 | Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz |
0fd19552 | 95 | # Source2-md5: 1f990209b6c102e41a45bec854b76fa2 |
44d18de7 | 96 | Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz |
0fd19552 | 97 | # Source3-md5: 4a02bc28b793a698342debdd01e65ce3 |
44d18de7 | 98 | Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz |
0fd19552 | 99 | # Source4-md5: 34a8dc88cce024f9668746f849fe3c35 |
44d18de7 | 100 | Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz |
0fd19552 | 101 | # Source5-md5: 45741472f0b8a0f4261f4599a1387acd |
44d18de7 | 102 | Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz |
0fd19552 | 103 | # Source6-md5: 53e64e6eeda6705fb13e1d233f79def4 |
1a356f89 | 104 | Source7: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/flang-%{version}.src.tar.xz |
0fd19552 | 105 | # Source7-md5: 40d4b36d5b3b954eff378b3d6f19549c |
ccfdfd0e | 106 | # "mlir" subdir extracted from https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-project-13.0.1.src.tar.xz |
1a356f89 | 107 | Source8: mlir-%{version}.tar.xz |
0fd19552 JP |
108 | # Source8-md5: 6e023f0e2b8bde4b2270b900e9858a94 |
109 | Source9: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cmake-%{version}.src.tar.xz | |
110 | # Source9-md5: f4b68e2c84d3a14d289ff0379ff30ed3 | |
9f7b77bd | 111 | Patch1: %{name}-pld.patch |
200602f4 | 112 | Patch2: %{name}-python-modules.patch |
9f7b77bd | 113 | Patch3: x32-gcc-toolchain.patch |
d96b39d3 | 114 | Patch4: cmake-buildtype.patch |
d706a70d | 115 | Patch5: %{name}-ocaml-shared.patch |
1a356f89 | 116 | Patch6: %{name}-flang.patch |
40bef2a3 | 117 | Patch7: llvm12-build_fixes.patch |
4a967aa9 | 118 | Patch8: %{name}-selective_bindings.patch |
e25801fb | 119 | Patch9: %{name}-libexecdir.patch |
90b20139 | 120 | Patch10: compiler-rt-paths.patch |
0fd19552 | 121 | Patch11: cmake-utils-path-override.patch |
91cd1ec7 | 122 | Patch12: x32-compiler-rt.patch |
5acac09f | 123 | Patch13: atomic.patch |
77d2fdeb | 124 | URL: https://llvm.org/ |
bc88141a | 125 | BuildRequires: bash |
803f8d9b | 126 | BuildRequires: binutils-devel |
d997b14b | 127 | BuildRequires: bison |
134d4fc5 | 128 | BuildRequires: cmake >= 3.13.4 |
d997b14b | 129 | BuildRequires: flex |
d997b14b | 130 | BuildRequires: groff |
6c2b1a44 | 131 | BuildRequires: libedit-devel |
bc88141a | 132 | BuildRequires: libltdl-devel |
44d18de7 | 133 | BuildRequires: libpfm-devel |
ad697ab7 | 134 | BuildRequires: libstdc++-devel >= 6:5 |
44d18de7 | 135 | BuildRequires: libxml2-devel >= 2 |
6c2b1a44 | 136 | BuildRequires: ncurses-devel |
2bbd0701 | 137 | %if %{with ocaml} |
5013c7ea | 138 | BuildRequires: ocaml >= 4.00.0 |
c6c890ee | 139 | BuildRequires: ocaml-ctypes-devel >= 0.4 |
2bbd0701 | 140 | BuildRequires: ocaml-findlib |
77c13dab | 141 | BuildRequires: ocaml-ocamldoc |
85ae1a18 | 142 | %{?with_tests:BuildRequires: ocaml-ounit >= 2} |
2bbd0701 | 143 | %endif |
8132e62b | 144 | BuildRequires: perl-base >= 1:5.6 |
8c156e7d | 145 | BuildRequires: perl-tools-pod |
134d4fc5 | 146 | BuildRequires: python3 >= 1:3 |
40bef2a3 JP |
147 | BuildRequires: python3-PyYAML |
148 | BuildRequires: python3-pygments >= 2.0 | |
1aabdf46 | 149 | BuildRequires: rpm-build >= 4.6 |
8c156e7d | 150 | BuildRequires: rpm-pythonprov |
a5fe2ce1 | 151 | BuildRequires: rpmbuild(macros) >= 1.742 |
b0068ae4 | 152 | %{?with_doc:BuildRequires: sphinx-pdg} |
b883cf1e | 153 | BuildRequires: tar >= 1:1.22 |
78991aba | 154 | BuildRequires: xar-devel >= 1.6 |
b883cf1e | 155 | BuildRequires: xz |
200602f4 | 156 | %{?with_z3:BuildRequires: z3-devel >= 4.7.1} |
6c2b1a44 | 157 | BuildRequires: zlib-devel |
dd9350c7 JB |
158 | %if %{with apidocs} |
159 | BuildRequires: doxygen | |
160 | BuildRequires: graphviz | |
161 | %endif | |
162 | %if %{with tests} | |
163 | BuildRequires: dejagnu | |
dd9350c7 | 164 | BuildRequires: tcl-devel |
356a0bbd | 165 | %endif |
589b92f5 JB |
166 | %if %{with rt} && %{with multilib} |
167 | %ifarch %{x8664} | |
168 | BuildRequires: gcc-c++-multilib-32 | |
90b20139 | 169 | BuildRequires: glibc-devel(ix86) |
589b92f5 JB |
170 | BuildRequires: libstdc++-multilib-32-devel |
171 | %endif | |
fe705967 | 172 | %ifarch x32 |
3b28b31d JB |
173 | BuildRequires: gcc-c++-multilib-32 |
174 | BuildRequires: gcc-c++-multilib-64 | |
175 | BuildRequires: glibc-devel(x86_64) | |
90b20139 | 176 | BuildRequires: glibc-devel(ix86) |
3b28b31d JB |
177 | BuildRequires: libstdc++-multilib-32-devel |
178 | BuildRequires: libstdc++-multilib-64-devel | |
fe705967 | 179 | %endif |
589b92f5 | 180 | %endif |
b883cf1e | 181 | %if %{with lldb} |
c6c890ee | 182 | BuildRequires: epydoc |
d92b4c2a | 183 | %ifarch i386 i486 %{arm} |
64f4e87f JB |
184 | BuildRequires: libatomic-devel |
185 | %endif | |
b883cf1e | 186 | BuildRequires: libxml2-devel >= 2 |
ad697ab7 | 187 | BuildRequires: lua-devel |
b883cf1e | 188 | BuildRequires: ncurses-ext-devel |
134d4fc5 | 189 | BuildRequires: python3-devel >= 1:3.2 |
c330693d | 190 | %{?with_doc:BuildRequires: python3-recommonmark} |
12aa4b7a | 191 | BuildRequires: swig-python >= 3.0.11 |
ad697ab7 | 192 | BuildRequires: xz-devel |
b883cf1e | 193 | %endif |
b0068ae4 | 194 | %if %{with polly} |
6c2b1a44 JB |
195 | #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath) |
196 | # private copy in polly/lib/External/isl | |
ad697ab7 | 197 | #BuildRequires: isl-devel >= 0.22.1 |
6c2b1a44 | 198 | #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON) |
9b8c1bd2 | 199 | %{?with_target_nvptx:BuildRequires: ocl-icd-libOpenCL-devel} |
b0068ae4 | 200 | %endif |
634a3e5b JB |
201 | %if %{with ocaml} |
202 | BuildConflicts: llvm-ocaml | |
203 | %endif | |
8c514f23 | 204 | Requires: %{name}-libs = %{version}-%{release} |
9556f4c9 ER |
205 | # LLVM is not supported on PPC64 |
206 | # http://llvm.org/bugs/show_bug.cgi?id=3729 | |
207 | ExcludeArch: ppc64 | |
aa11c230 | 208 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
209 | ||
0fd19552 | 210 | %define abi 15 |
356a0bbd | 211 | %define _sysconfdir /etc/%{name} |
021b3c3d | 212 | |
9556f4c9 | 213 | %define specflags_ppc -fno-var-tracking-assignments |
7a1e73fa JP |
214 | |
215 | # objcopy: BFD (GNU Binutils) 2.32 assertion fail format.c:459 | |
216 | # objcopy: error: .../libLLVM-8.so(.debug_gnu_pubtypes) is too large (0x1ceee347 bytes) | |
217 | # objcopy: .../libLLVM-8.so[.debug_gnu_pubtypes]: memory exhausted | |
218 | %ifarch x32 | |
219 | %define _enable_debug_packages 0 | |
220 | %endif | |
af221038 | 221 | # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237 |
5013c7ea JB |
222 | # use -gsplit-dwarf only when building packages with debuginfo |
223 | # to avoid excessive disk space usage | |
50fe0adf JB |
224 | %if 0%{?_enable_debug_packages} |
225 | %define specflags -gsplit-dwarf | |
226 | %endif | |
9556f4c9 | 227 | |
6832a5c5 ER |
228 | # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ... |
229 | %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\) | |
230 | ||
782c6e1e ER |
231 | # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config |
232 | # -Werror=format-security is for swig | |
233 | # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp | |
4a1d21cc | 234 | %define filterout_c -fvar-tracking-assignments |
782c6e1e | 235 | %define filterout_cxx -fvar-tracking-assignments -Werror=format-security |
4a1d21cc JR |
236 | %define filterout_ccpp -fvar-tracking-assignments |
237 | ||
aa11c230 | 238 | %description |
239 | LLVM is a compiler infrastructure designed for compile-time, | |
240 | link-time, runtime, and idle-time optimization of programs from | |
241 | arbitrary programming languages. LLVM is written in C++ and has been | |
242 | developed since 2000 at the University of Illinois and Apple. It | |
621ec11f JB |
243 | currently supports compilation of C and C++ programs using clang |
244 | frontend. | |
aa11c230 | 245 | |
2326a99f JB |
246 | %description -l pl.UTF-8 |
247 | LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji | |
248 | czasu kompilowania, linkowania, działania i bezczynności programów w | |
249 | dowolnych językach programowania. Jest napisana w C++, rozwijana od | |
250 | roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje | |
621ec11f | 251 | kompilację programów w C i C++ przy użyciu frontendu clang. |
2326a99f | 252 | |
8c514f23 | 253 | %package libs |
87977e26 JR |
254 | Summary: LLVM shared libraries |
255 | Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a | |
8c514f23 JB |
256 | Group: Libraries |
257 | Conflicts: llvm < 3.2 | |
258 | ||
259 | %description libs | |
87977e26 | 260 | LLVM shared libraries. |
8c514f23 JB |
261 | |
262 | %description libs -l pl.UTF-8 | |
87977e26 | 263 | Biblioteki współdzielone LLVM-a. |
8c514f23 | 264 | |
bc88141a | 265 | %package devel |
621ec11f JB |
266 | Summary: Static libraries and header files for LLVM |
267 | Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a | |
bc88141a | 268 | Group: Development/Languages |
8c514f23 | 269 | Requires: %{name}-libs = %{version}-%{release} |
bc88141a ER |
270 | Requires: libstdc++-devel >= 6:3.4 |
271 | ||
272 | %description devel | |
621ec11f JB |
273 | This package contains static libraries and header files needed to |
274 | develop new native programs that use the LLVM infrastructure. | |
275 | ||
276 | %description devel -l pl.UTF-8 | |
277 | Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe | |
278 | potrzebne do tworzenia nowych programów natywnych wykorzystujących | |
279 | infrastrukturę LLVM. | |
bc88141a | 280 | |
9556f4c9 ER |
281 | %package doc |
282 | Summary: Documentation for LLVM | |
621ec11f | 283 | Summary(pl.UTF-8): Dokumentacja do LLVM-a |
9556f4c9 ER |
284 | Group: Documentation |
285 | # does not require base | |
bc88141a | 286 | |
9556f4c9 ER |
287 | %description doc |
288 | Documentation for the LLVM compiler infrastructure. | |
bc88141a | 289 | |
621ec11f JB |
290 | %description doc -l pl.UTF-8 |
291 | Dokumentacja do infrastruktury kompilatorów LLVM. | |
292 | ||
9556f4c9 ER |
293 | %package apidocs |
294 | Summary: API documentation for LLVM | |
621ec11f | 295 | Summary(pl.UTF-8): Dokumentacja API LLVM-a |
9556f4c9 ER |
296 | Group: Development/Languages |
297 | Requires: %{name}-doc = %{version}-%{release} | |
bc88141a | 298 | |
9556f4c9 ER |
299 | %description apidocs |
300 | API documentation for the LLVM compiler infrastructure. | |
bc88141a | 301 | |
621ec11f JB |
302 | %description apidocs -l pl.UTF-8 |
303 | Dokumentacja API infrastruktury kompilatorów LLVM. | |
304 | ||
d27b2b77 JB |
305 | %package mlir |
306 | Summary: LLVM Multi-Level Intermediate Representation libraries and tools | |
307 | Summary(pl.UTF-8): Biblioteki i narzędzia wielopoziomowej reprezentacji pośredniej LLVM | |
308 | Group: Development/Tools | |
309 | URL: https://mlir.llvm.org/ | |
310 | Requires: %{name} = %{version}-%{release} | |
311 | ||
312 | %description mlir | |
313 | LLVM Multi-Level Intermediate Representation libraries and tools. | |
314 | ||
315 | %description mlir -l pl.UTF-8 | |
316 | Biblioteki i narzędzia wielopoziomowej reprezentacji pośredniej LLVM. | |
317 | ||
318 | %package mlir-devel | |
319 | Summary: LLVM Multi-Level Intermediate Representation development files | |
320 | Summary(pl.UTF-8): Pliki do programowania z użyciem wielopoziomowej reprezentacji pośredniej LLVM | |
321 | Group: Development/Tools | |
322 | URL: https://mlir.llvm.org/ | |
323 | Requires: %{name}-devel = %{version}-%{release} | |
324 | Requires: %{name}-mlir = %{version}-%{release} | |
325 | ||
326 | %description mlir-devel | |
327 | LLVM Multi-Level Intermediate Representation development files. | |
328 | ||
329 | %description mlir-devel -l pl.UTF-8 | |
330 | Pliki do programowania z użyciem wielopoziomowej reprezentacji | |
331 | pośredniej LLVM. | |
332 | ||
b0068ae4 JB |
333 | %package polly |
334 | Summary: Polyhedral optimizations for LLVM | |
335 | Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a | |
336 | Group: Development/Tools | |
77d2fdeb | 337 | URL: https://polly.llvm.org/ |
b0068ae4 JB |
338 | Requires: %{name} = %{version}-%{release} |
339 | ||
340 | %description polly | |
341 | Polly is a high-level loop and data-locality optimizer and | |
342 | optimization infrastructure for LLVM. It uses an abstract mathematical | |
343 | representation based on integer polyhedra to analyze and optimize the | |
344 | memory access pattern of a program. | |
345 | ||
346 | %description polly -l pl.UTF-8 | |
347 | Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do | |
348 | optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną | |
349 | reprezentację matematyczną opartą na wielościanach całkowitoliczbowych | |
350 | do analizy i optymalizacji wzorców dostępu do pamięci przez program. | |
351 | ||
352 | %package polly-devel | |
353 | Summary: Header files for LLVM Polly optimization infrastructure | |
354 | Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly | |
355 | Group: Development/Libraries | |
77d2fdeb | 356 | URL: https://polly.llvm.org/ |
b0068ae4 JB |
357 | Requires: %{name}-devel = %{version}-%{release} |
358 | Requires: %{name}-polly = %{version}-%{release} | |
359 | ||
360 | %description polly-devel | |
361 | Header files for LLVM Polly optimization infrastructure. | |
362 | ||
363 | %description polly-devel -l pl.UTF-8 | |
364 | Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly. | |
365 | ||
d997b14b AM |
366 | %package -n clang |
367 | Summary: A C language family frontend for LLVM | |
621ec11f | 368 | Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C |
d997b14b | 369 | Group: Development/Languages |
77d2fdeb | 370 | URL: https://clang.llvm.org/ |
8c514f23 | 371 | Requires: %{name} = %{version}-%{release} |
87977e26 | 372 | Requires: clang-libs = %{version}-%{release} |
d997b14b AM |
373 | |
374 | %description -n clang | |
375 | clang: noun 1. A loud, resonant, metallic sound. 2. The strident call | |
376 | of a crane or goose. 3. C-language family front-end toolkit. | |
377 | ||
378 | The goal of the Clang project is to create a new C, C++, Objective C | |
379 | and Objective C++ front-end for the LLVM compiler. Its tools are built | |
380 | as libraries and designed to be loosely-coupled and extendable. | |
381 | ||
621ec11f JB |
382 | %description -n clang -l pl.UTF-8 |
383 | clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2. | |
384 | piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków | |
385 | z rodziny C. | |
386 | ||
387 | Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora | |
388 | LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są | |
389 | budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu | |
390 | i rozszerzaniu. | |
391 | ||
9eefd942 JR |
392 | %package -n clang-multilib |
393 | Summary: A C language family frontend for LLVM - 32-bit support | |
394 | Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych | |
9eefd942 | 395 | Group: Development/Languages |
77d2fdeb | 396 | URL: https://clang.llvm.org/ |
9eefd942 JR |
397 | Requires: clang = %{version}-%{release} |
398 | ||
399 | %description -n clang-multilib | |
400 | clang: noun 1. A loud, resonant, metallic sound. 2. The strident call | |
401 | of a crane or goose. 3. C-language family front-end toolkit. | |
402 | ||
403 | The goal of the Clang project is to create a new C, C++, Objective C | |
404 | and Objective C++ front-end for the LLVM compiler. Its tools are built | |
405 | as libraries and designed to be loosely-coupled and extendable. | |
406 | ||
407 | This package contains the C compiler support for producing 32-bit | |
408 | programs on 64-bit host. | |
409 | ||
410 | %description -n clang-multilib -l pl.UTF-8 | |
411 | clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2. | |
412 | piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków | |
413 | z rodziny C. | |
414 | ||
415 | Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora | |
416 | LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są | |
417 | budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu | |
418 | i rozszerzaniu. | |
419 | ||
420 | Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia | |
421 | programów 32-bitowych na maszynie 64-bitowej. | |
422 | ||
cb7d0198 JB |
423 | %package -n clang-libs |
424 | Summary: Clang shared libraries | |
425 | Summary(pl.UTF-8): Biblioteki współdzielone Clanga | |
426 | Group: Libraries | |
427 | URL: https://clang.llvm.org/ | |
d997b14b | 428 | |
cb7d0198 JB |
429 | %description -n clang-libs |
430 | Clang shared libraries. | |
d997b14b | 431 | |
cb7d0198 JB |
432 | %description -n clang-libs -l pl.UTF-8 |
433 | Biblioteki współdzielone Clanga. | |
621ec11f | 434 | |
9556f4c9 | 435 | %package -n clang-devel |
621ec11f JB |
436 | Summary: Header files for Clang |
437 | Summary(pl.UTF-8): Pliki nagłówkowe Clanga | |
9556f4c9 | 438 | Group: Development/Languages |
77d2fdeb | 439 | URL: https://clang.llvm.org/ |
8c514f23 | 440 | Requires: %{name}-devel = %{version}-%{release} |
9556f4c9 | 441 | Requires: clang = %{version}-%{release} |
07de6be6 | 442 | %{?with_polly:Requires: llvm-polly-devel = %{version}-%{release}} |
9556f4c9 ER |
443 | |
444 | %description -n clang-devel | |
445 | This package contains header files for the Clang compiler. | |
446 | ||
621ec11f JB |
447 | %description -n clang-devel -l pl.UTF-8 |
448 | Ten pakiet zawiera pliki nagłówkowe kompilatora Clang. | |
449 | ||
9556f4c9 ER |
450 | %package -n clang-doc |
451 | Summary: Documentation for Clang | |
621ec11f | 452 | Summary(pl.UTF-8): Dokumentacja do Clanga |
77d2fdeb | 453 | URL: https://clang.llvm.org/ |
9556f4c9 ER |
454 | Group: Documentation |
455 | Requires: %{name} = %{version}-%{release} | |
456 | ||
457 | %description -n clang-doc | |
458 | Documentation for the Clang compiler front-end. | |
459 | ||
621ec11f JB |
460 | %description -n clang-doc -l pl.UTF-8 |
461 | Dokumentacja do frontendu kompilatora Clang. | |
462 | ||
9556f4c9 ER |
463 | %package -n clang-apidocs |
464 | Summary: API documentation for Clang | |
621ec11f | 465 | Summary(pl.UTF-8): Dokumentacja API Clanga |
77d2fdeb | 466 | URL: https://clang.llvm.org/ |
9556f4c9 ER |
467 | Group: Development/Languages |
468 | Requires: clang-doc = %{version}-%{release} | |
469 | ||
470 | %description -n clang-apidocs | |
471 | API documentation for the Clang compiler. | |
472 | ||
621ec11f JB |
473 | %description -n clang-apidocs -l pl.UTF-8 |
474 | Dokumentacja API kompilatora Clang. | |
475 | ||
cb7d0198 JB |
476 | %package -n clang-analyzer |
477 | Summary: A source code analysis framework | |
478 | Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego | |
479 | Group: Development/Languages | |
480 | URL: https://clang-analyzer.llvm.org/ | |
481 | Requires: clang = %{version}-%{release} | |
482 | # not picked up automatically since files are currently not instaled | |
483 | # in standard Python hierarchies yet | |
484 | Requires: python3 | |
485 | ||
486 | %description -n clang-analyzer | |
487 | The Clang Static Analyzer consists of both a source code analysis | |
488 | framework and a standalone tool that finds bugs in C and Objective-C | |
489 | programs. The standalone tool is invoked from the command-line, and is | |
490 | intended to run in tandem with a build of a project or code base. | |
491 | ||
492 | %description -n clang-analyzer -l pl.UTF-8 | |
493 | Clang Static Analyzer składa się ze szkieletu do analizy kodu | |
494 | źródłowego oraz samodzielnego narzędzia znajdującego błędy w | |
495 | programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z | |
496 | myślą o uruchamianiu wraz z kompilacją projektu lub kodu. | |
497 | ||
b0068ae4 JB |
498 | %package -n clang-tools-extra |
499 | Summary: Extra tools for Clang | |
500 | Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang | |
501 | Group: Development/Tools | |
77d2fdeb | 502 | URL: https://clang.llvm.org/docs/ClangTools.html |
b0068ae4 JB |
503 | Requires: clang = %{version}-%{release} |
504 | ||
505 | %description -n clang-tools-extra | |
506 | Extra tools for Clang. | |
507 | ||
508 | %description -n clang-tools-extra -l pl.UTF-8 | |
509 | Dodatkowe narzędzia do kompilatora Clang. | |
510 | ||
d13e7dd0 JB |
511 | %package -n bash-completion-clang |
512 | Summary: Bash completion for clang command | |
513 | Summary(pl.UTF-8): Bashowe dopełnianie składni polecenia clang | |
514 | Group: Applications/Shells | |
d60cad67 | 515 | Requires: bash-completion >= 1:2.0 |
d13e7dd0 JB |
516 | Requires: clang = %{version}-%{release} |
517 | ||
518 | %description -n bash-completion-clang | |
519 | Bash completion for clang command. | |
520 | ||
521 | %description -n bash-completion-clang -l pl.UTF-8 | |
522 | Bashowe dopełnianie składni polecenia clang. | |
523 | ||
d27b2b77 JB |
524 | %package -n flang |
525 | Summary: Fortran frontend for LLVM | |
526 | Summary(pl.UTF-8): Frontend LLVM-a do Fortranu | |
527 | Group: Development/Languages | |
528 | URL: http://flang.llvm.org/ | |
529 | Requires: %{name}-mlir = %{version}-%{release} | |
530 | ||
531 | %description -n flang | |
532 | Flang is a ground-up implementation of a Fortran front end written in | |
533 | modern C++. | |
534 | ||
535 | %description -n flang -l pl.UTF-8 | |
536 | Flang to napisana od podstaw we współczesnym C++ implementacja | |
537 | frontendu do Fortranu. | |
538 | ||
539 | %package -n flang-devel | |
540 | Summary: Fortran frontend for LLVM - development files | |
541 | Summary(pl.UTF-8): Frontend LLVM-a do Fortranu - pliki programistyczne | |
542 | Group: Development/Languages | |
543 | URL: http://flang.llvm.org/ | |
544 | Requires: %{name}-mlir-devel = %{version}-%{release} | |
545 | Requires: flang-devel = %{version}-%{release} | |
546 | ||
547 | %description -n flang-devel | |
548 | Development files for LLVM Fortran frontend. | |
549 | ||
550 | %description -n flang-devel -l pl.UTF-8 | |
551 | Pliki prosramistyczne frontendu LLVM do Fortranu. | |
552 | ||
ba1cf74d JB |
553 | %package -n lld |
554 | Summary: The LLVM linker | |
555 | Summary(pl.UTF-8): Konsolidator z projektu LLVM | |
556 | Group: Development/Libraries | |
77d2fdeb | 557 | URL: https://lld.llvm.org/ |
ba1cf74d JB |
558 | Requires: %{name} = %{version}-%{release} |
559 | ||
560 | %description -n lld | |
561 | lld is a new set of modular code for creating linker tools. | |
562 | ||
563 | %description -n lld -l pl.UTF-8 | |
564 | lld to nowy zbiór modularnego kodu do tworzenia narzędzi | |
565 | konsolidujących. | |
566 | ||
567 | %package -n lld-devel | |
568 | Summary: Development files for LLD linker tools | |
569 | Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD | |
570 | Group: Development/Tools | |
77d2fdeb | 571 | URL: https://lld.llvm.org/ |
ba1cf74d | 572 | Requires: %{name}-devel = %{version}-%{release} |
78991aba | 573 | Requires: xar-devel >= 1.6 |
ba1cf74d JB |
574 | |
575 | %description -n lld-devel | |
576 | Development files for LLD linker tools. | |
577 | ||
578 | %description -n lld-devel -l pl.UTF-8 | |
579 | Pliki programistyczne narzędzi konsolidujących LLD. | |
580 | ||
5a7ac479 JB |
581 | %package -n lldb |
582 | Summary: Next generation high-performance debugger | |
583 | Summary(pl.UTF-8): Wydajny debugger nowej generacji | |
584 | Group: Development/Debuggers | |
77d2fdeb | 585 | URL: https://lldb.llvm.org/ |
5a7ac479 | 586 | Requires: %{name} = %{version}-%{release} |
40bef2a3 | 587 | Requires: python3-six |
5a7ac479 JB |
588 | |
589 | %description -n lldb | |
590 | LLDB is a next generation, high-performance debugger. It is built as a | |
591 | set of reusable components which highly leverage existing libraries in | |
592 | the larger LLVM Project, such as the Clang expression parser and LLVM | |
593 | disassembler. | |
594 | ||
595 | %description -n lldb -l pl.UTF-8 | |
596 | LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o | |
597 | komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki | |
598 | w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz | |
599 | disasembler LLVM. | |
600 | ||
601 | %package -n lldb-devel | |
ba1cf74d JB |
602 | Summary: Development files for LLDB debugger |
603 | Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB | |
5a7ac479 | 604 | Group: Development/Libraries |
77d2fdeb | 605 | URL: https://lldb.llvm.org/ |
5a7ac479 JB |
606 | Requires: %{name}-devel = %{version}-%{release} |
607 | Requires: clang-devel = %{version}-%{release} | |
608 | Requires: lldb = %{version}-%{release} | |
609 | ||
610 | %description -n lldb-devel | |
ba1cf74d | 611 | Development files for LLDB debugger. |
5a7ac479 JB |
612 | |
613 | %description -n lldb-devel -l pl.UTF-8 | |
ba1cf74d | 614 | Pliki programistyczne debuggera LLDB. |
5a7ac479 | 615 | |
9556f4c9 ER |
616 | %package ocaml |
617 | Summary: OCaml binding for LLVM | |
621ec11f JB |
618 | Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a |
619 | Group: Libraries | |
9556f4c9 | 620 | Requires: %{name} = %{version}-%{release} |
c450bf27 | 621 | %if %{with ocaml} |
9556f4c9 | 622 | %requires_eq ocaml-runtime |
c450bf27 | 623 | %endif |
9556f4c9 | 624 | |
621ec11f | 625 | %description ocaml |
9556f4c9 ER |
626 | OCaml binding for LLVM. |
627 | ||
621ec11f JB |
628 | %description ocaml -l pl.UTF-8 |
629 | Wiązanie OCamla do LLVM-a. | |
630 | ||
9556f4c9 | 631 | %package ocaml-devel |
621ec11f JB |
632 | Summary: Development files for LLVM OCaml binding |
633 | Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a | |
9556f4c9 ER |
634 | Group: Development/Libraries |
635 | Requires: %{name}-devel = %{version}-%{release} | |
636 | Requires: %{name}-ocaml = %{version}-%{release} | |
637 | ||
638 | %description ocaml-devel | |
639 | The llvm-ocaml-devel package contains libraries and signature files | |
621ec11f JB |
640 | for developing applications that use llvm-ocaml binding. |
641 | ||
642 | %description ocaml-devel -l pl.UTF-8 | |
643 | Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji | |
644 | wykorzystujących wiązanie llvm-ocaml. | |
645 | ||
9556f4c9 ER |
646 | %package ocaml-doc |
647 | Summary: Documentation for LLVM's OCaml binding | |
621ec11f | 648 | Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a |
9556f4c9 ER |
649 | Group: Documentation |
650 | Requires: %{name}-ocaml = %{version}-%{release} | |
651 | ||
652 | %description ocaml-doc | |
653 | HTML documentation for LLVM's OCaml binding. | |
654 | ||
621ec11f JB |
655 | %description ocaml-doc -l pl.UTF-8 |
656 | Dokumentacja HTML wiązania OCamla do LLVM-a. | |
657 | ||
d7447383 JR |
658 | %package opt-viewer |
659 | Summary: Optimization records visualization tools | |
83d2be6c | 660 | Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji |
d7447383 JR |
661 | Group: Development/Tools |
662 | Requires: %{name} = %{version} | |
8e9fbe9e | 663 | BuildArch: noarch |
d7447383 JR |
664 | |
665 | %description opt-viewer | |
666 | Optimization records visualization tools. | |
667 | ||
83d2be6c JB |
668 | %description opt-viewer -l pl.UTF-8 |
669 | Narzędzia do wizualizacji rekordów optymalizacji. | |
670 | ||
d7447383 | 671 | %package -n vim-plugin-clang |
83d2be6c JB |
672 | Summary: Clang format and rename integration for Vim |
673 | Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem | |
d7447383 JR |
674 | Group: Applications/Editors/Vim |
675 | Requires: vim-rt >= 4:7.0 | |
676 | BuildArch: noarch | |
677 | ||
678 | %description -n vim-plugin-clang | |
83d2be6c JB |
679 | Clang format and rename integration for Vim. |
680 | ||
681 | %description -n vim-plugin-clang -l pl.UTF-8 | |
682 | Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem. | |
d7447383 | 683 | |
aa11c230 | 684 | %prep |
0fd19552 | 685 | %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6 %{?with_flang:-a7} %{?with_mlir:-a8} -a9 |
44d18de7 | 686 | %{__mv} clang-%{version}.src tools/clang |
5013c7ea JB |
687 | %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt} |
688 | %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb} | |
689 | %{?with_polly:%{__mv} polly-%{version}.src tools/polly} | |
d706a70d JB |
690 | %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra |
691 | %{__mv} lld-%{version}.src tools/lld | |
1a356f89 JB |
692 | %if %{with flang} |
693 | %{__mv} flang-%{version}.src tools/flang | |
d27b2b77 JB |
694 | %endif |
695 | %if %{with mlir} | |
1a356f89 JB |
696 | %{__mv} mlir tools/mlir |
697 | %endif | |
0fd19552 | 698 | %{__mv} cmake-%{version}.src cmake-utils |
5a7ac479 | 699 | |
9f7b77bd | 700 | %patch1 -p1 |
200602f4 | 701 | %patch2 -p1 |
9f7b77bd | 702 | %patch3 -p1 |
d96b39d3 | 703 | %patch4 -p1 |
d706a70d | 704 | %patch5 -p1 |
1a356f89 JB |
705 | %if %{with flang} |
706 | %patch6 -p1 | |
707 | %endif | |
40bef2a3 | 708 | %patch7 -p1 |
4a967aa9 | 709 | %patch8 -p1 |
e25801fb | 710 | %patch9 -p1 |
90b20139 JP |
711 | %if %{with rt} |
712 | %patch10 -p1 | |
91cd1ec7 | 713 | %patch12 -p1 |
90b20139 | 714 | %endif |
0fd19552 | 715 | %patch11 -p1 |
5acac09f | 716 | %patch13 -p1 |
ce9cc204 | 717 | |
ef49a424 | 718 | grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{ |
90b20139 | 719 | s,^#!.*bin/env python3\?,#!%{__python3}, |
bacc8b96 ER |
720 | s,^#!.*bin/env perl,#!%{__perl}, |
721 | }' | |
722 | ||
d7447383 | 723 | find -name '*.py' -print0 | xargs -0 sed -i -e '1{ |
40bef2a3 | 724 | s,^#!.*bin/python.*,#!%{__python3}, |
d7447383 JR |
725 | }' |
726 | ||
d27b2b77 JB |
727 | %if %{with flang} |
728 | %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/flang/tools/f18/flang.in | |
729 | %endif | |
730 | ||
d756c460 | 731 | %build |
41876fe7 | 732 | install -d build |
ebde279d | 733 | |
d997b14b | 734 | # Disabling assertions now, rec. by pure and needed for OpenGTL |
9556f4c9 | 735 | # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801 |
41876fe7 | 736 | cd build |
5e689738 | 737 | CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64" |
2bbd0701 | 738 | |
1431eb62 JP |
739 | %if %{with lowmem} |
740 | export CFLAGS="%{rpmcflags} -g0" | |
741 | export CXXFLAGS="%{rpmcxxflags} -g0" | |
eb891a99 | 742 | if echo 'int main(){}' | %{__cc} -x c %{rpmldflags} -Wl,--reduce-memory-overheads -o /dev/null - > /dev/null 2>&1; then |
1431eb62 | 743 | export LDFLAGS="%{rpmldflags} -Wl,--reduce-memory-overheads" |
eb891a99 | 744 | fi |
1431eb62 JP |
745 | %endif |
746 | ||
200602f4 JB |
747 | %cmake .. \ |
748 | -DBUILD_SHARED_LIBS:BOOL=OFF \ | |
200602f4 | 749 | -DENABLE_LINKER_BUILD_ID:BOOL=ON \ |
0fd19552 | 750 | -DLLVM_COMMON_CMAKE_UTILS="%{_builddir}/%{buildsubdir}/cmake-utils" \ |
200602f4 JB |
751 | -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \ |
752 | -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \ | |
753 | -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \ | |
754 | -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \ | |
0fd19552 | 755 | -DLLVM_INSTALL_PACKAGE_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_libdir}/cmake/llvm") \ |
90b20139 | 756 | -DLLVM_TOOLS_INSTALL_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_bindir}") \ |
9556f4c9 | 757 | %if %{with apidocs} |
41876fe7 | 758 | -DLLVM_ENABLE_DOXYGEN:BOOL=ON \ |
d997b14b | 759 | %endif |
44d18de7 | 760 | %{?with_cxxmodules:-DLLVM_ENABLE_MODULES:BOOL=ON} \ |
200602f4 JB |
761 | -DLLVM_ENABLE_PIC:BOOL=ON \ |
762 | -DLLVM_ENABLE_RTTI:BOOL=ON \ | |
41876fe7 JR |
763 | %if %{with doc} |
764 | -DLLVM_ENABLE_SPHINX:BOOL=ON \ | |
765 | %endif | |
90b20139 | 766 | -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \ |
ad697ab7 | 767 | %{?with_z3:-DLLVM_ENABLE_Z3_SOLVER:BOOL=ON} \ |
200602f4 JB |
768 | %if "%{_lib}" == "lib64" |
769 | -DLLVM_LIBDIR_SUFFIX:STRING=64 \ | |
770 | %endif | |
771 | %if "%{_lib}" == "libx32" | |
772 | -DLLVM_LIBDIR_SUFFIX:STRING=x32 \ | |
773 | %endif | |
9a23736f | 774 | -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ |
4cc5652a | 775 | -DLLVM_TARGET_ARCH:STRING=%{_target_base_arch} \ |
67331d50 | 776 | -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=%{_target_platform} \ |
1431eb62 JP |
777 | %if %{with lowmem} |
778 | -DLLVM_PARALLEL_LINK_JOBS:STRING=1 \ | |
779 | %endif | |
a531db5e | 780 | -DLLVM_TARGETS_TO_BUILD="%{targets_to_build}" \ |
8d52ede4 | 781 | %if %{with polly} |
a5fe2ce1 | 782 | %{cmake_on_off target_nvptx POLLY_ENABLE_GPGPU_CODEGEN} \ |
8d52ede4 | 783 | %endif |
cfaa3167 JP |
784 | -DSPHINX_WARNINGS_AS_ERRORS=OFF \ |
785 | %if %{with rt} | |
786 | %ifarch x32 | |
787 | -DCOMPILER_RT_BUILD_MEMPROF:BOOL=OFF | |
788 | %endif | |
789 | %endif | |
41876fe7 | 790 | |
d997b14b | 791 | %{__make} \ |
1628dc68 | 792 | VERBOSE=1 \ |
d997b14b | 793 | OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}" |
aa11c230 | 794 | |
827664e9 | 795 | %if %{with tests} |
9556f4c9 ER |
796 | %{__make} check 2>&1 | tee llvm-testlog.txt |
797 | %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt | |
798 | %endif | |
799 | ||
b0068ae4 | 800 | %if %{with doc} |
41876fe7 JR |
801 | %{__make} -C docs docs-llvm-html |
802 | %{__make} -C docs docs-llvm-man | |
c6c890ee | 803 | %if %{with ocaml} |
41876fe7 | 804 | %{__make} -C docs ocaml_doc |
c6c890ee | 805 | %endif |
41876fe7 JR |
806 | %{__make} -C tools/clang/docs docs-clang-html |
807 | %{__make} -C tools/clang/docs docs-clang-man | |
808 | %{__make} -C tools/lld/docs docs-lld-html | |
d1e2ca8d | 809 | # workaround failed import of _lldb |
90b20139 | 810 | cp -pnL %{_lib}/liblldb.so tools/lldb/docs/lldb/_lldb.so |
47e02cfd JP |
811 | %{__make} \ |
812 | LD_LIBRARY_PATH=$(pwd)/%{_lib} \ | |
40bef2a3 | 813 | -C tools/lldb/docs lldb-python-doc-package |
41876fe7 | 814 | %{__make} -C tools/lldb/docs lldb-cpp-doc |
dd9350c7 JB |
815 | %endif |
816 | ||
aa11c230 | 817 | %install |
818 | rm -rf $RPM_BUILD_ROOT | |
5013c7ea | 819 | |
464fc37c | 820 | %{__make} -j1 -C build install \ |
aa11c230 | 821 | DESTDIR=$RPM_BUILD_ROOT |
822 | ||
6df3b432 | 823 | # only some .pyc files are created by make install |
40bef2a3 JP |
824 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} |
825 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
6df3b432 | 826 | |
e25801fb JB |
827 | # Adjust static analyzer installation (see -libexecdir patch) |
828 | abs_ca_libexecdir="%{_libexecdir}/clang-analyzer" | |
829 | rel_ca_libexecdir="${abs_ca_libexecdir#%{_prefix}}" | |
830 | %{__sed} -i -e "s,/\.\./libexec/,/..${rel_ca_libexecdir}/," $RPM_BUILD_ROOT%{_bindir}/scan-build | |
40bef2a3 JP |
831 | %py3_comp $RPM_BUILD_ROOT%{_datadir}/scan-view |
832 | %py3_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view | |
d997b14b | 833 | |
6df3b432 | 834 | # not installed by cmake buildsystem |
6df3b432 JB |
835 | install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir} |
836 | ||
b0068ae4 | 837 | %if %{with doc} |
6df3b432 | 838 | cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
b883cf1e | 839 | # these tools are not installed |
95bd4382 | 840 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,clang-tblgen,lldb-tblgen}.1 |
b0068ae4 JB |
841 | # make links |
842 | echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1 | |
dd9350c7 JB |
843 | %endif |
844 | ||
d997b14b | 845 | # Move documentation back to build directory |
2bbd0701 | 846 | %if %{with ocaml} |
6df3b432 | 847 | rm -rf ocamldocs |
5013c7ea | 848 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs |
2bbd0701 | 849 | %endif |
9556f4c9 ER |
850 | |
851 | # and separate the apidoc | |
852 | %if %{with apidocs} | |
6df3b432 JB |
853 | rm -rf clang-apidoc |
854 | cp -a build/tools/clang/docs/html clang-apidoc | |
9556f4c9 | 855 | %endif |
d997b14b AM |
856 | |
857 | # And prepare Clang documentation | |
d997b14b | 858 | rm -rf clang-docs |
9556f4c9 | 859 | install -d clang-docs |
827664e9 | 860 | for f in LICENSE.TXT NOTES.txt README.txt; do |
9556f4c9 | 861 | ln tools/clang/$f clang-docs |
d997b14b | 862 | done |
021b3c3d | 863 | |
d13e7dd0 JB |
864 | install -d $RPM_BUILD_ROOT%{bash_compdir} |
865 | %{__mv} $RPM_BUILD_ROOT%{_datadir}/clang/bash-autocomplete.sh $RPM_BUILD_ROOT%{bash_compdir}/clang | |
866 | ||
d2551984 | 867 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/c-index-test |
6df3b432 JB |
868 | # not this OS |
869 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript | |
d706a70d | 870 | # use system six |
406426c9 | 871 | %{?with_lldb:%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/{,__pycache__/}six*.py*} |
03073220 JK |
872 | # it seems it is used internally by an extra clang tool |
873 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a | |
6832a5c5 | 874 | |
fba35f64 | 875 | # disable completeness check incompatible with split packaging |
d27b2b77 JB |
876 | %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' \ |
877 | $RPM_BUILD_ROOT%{_libdir}/cmake/clang/ClangTargets.cmake \ | |
878 | %if %{with flang} | |
879 | $RPM_BUILD_ROOT%{_libdir}/cmake/flang/FlangTargets.cmake \ | |
880 | %endif | |
881 | $RPM_BUILD_ROOT%{_libdir}/cmake/lld/LLDTargets.cmake \ | |
882 | $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake \ | |
883 | %if %{with mlir} | |
884 | $RPM_BUILD_ROOT%{_libdir}/cmake/mlir/MLIRTargets.cmake | |
885 | %endif | |
fba35f64 | 886 | |
aa11c230 | 887 | %clean |
888 | rm -rf $RPM_BUILD_ROOT | |
889 | ||
8c514f23 JB |
890 | %post libs -p /sbin/ldconfig |
891 | %postun libs -p /sbin/ldconfig | |
aa11c230 | 892 | |
d27b2b77 JB |
893 | %post mlir -p /sbin/ldconfig |
894 | %postun mlir -p /sbin/ldconfig | |
895 | ||
5013c7ea JB |
896 | %post -n clang-libs -p /sbin/ldconfig |
897 | %postun -n clang-libs -p /sbin/ldconfig | |
5a7ac479 JB |
898 | |
899 | %post -n lldb -p /sbin/ldconfig | |
900 | %postun -n lldb -p /sbin/ldconfig | |
901 | ||
aa11c230 | 902 | %files |
903 | %defattr(644,root,root,755) | |
8132e62b | 904 | %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt} |
a9beeab5 | 905 | %attr(755,root,root) %{_bindir}/bugpoint |
8f8cf7a8 | 906 | %attr(755,root,root) %{_bindir}/dsymutil |
a9beeab5 JB |
907 | %attr(755,root,root) %{_bindir}/llc |
908 | %attr(755,root,root) %{_bindir}/lli | |
d1e2ca8d | 909 | %attr(755,root,root) %{_bindir}/llvm-addr2line |
8132e62b JB |
910 | %attr(755,root,root) %{_bindir}/llvm-ar |
911 | %attr(755,root,root) %{_bindir}/llvm-as | |
912 | %attr(755,root,root) %{_bindir}/llvm-bcanalyzer | |
40bef2a3 | 913 | %attr(755,root,root) %{_bindir}/llvm-bitcode-strip |
d2551984 | 914 | %attr(755,root,root) %{_bindir}/llvm-c-test |
5013c7ea | 915 | %attr(755,root,root) %{_bindir}/llvm-cat |
23ae6496 | 916 | %attr(755,root,root) %{_bindir}/llvm-cfi-verify |
827664e9 | 917 | %attr(755,root,root) %{_bindir}/llvm-cov |
265e167c | 918 | %attr(755,root,root) %{_bindir}/llvm-cvtres |
5013c7ea JB |
919 | %attr(755,root,root) %{_bindir}/llvm-cxxdump |
920 | %attr(755,root,root) %{_bindir}/llvm-cxxfilt | |
0bc9c5c9 | 921 | %attr(755,root,root) %{_bindir}/llvm-cxxmap |
0fd19552 | 922 | %attr(755,root,root) %{_bindir}/llvm-debuginfod |
90b20139 | 923 | %attr(755,root,root) %{_bindir}/llvm-debuginfod-find |
8132e62b JB |
924 | %attr(755,root,root) %{_bindir}/llvm-diff |
925 | %attr(755,root,root) %{_bindir}/llvm-dis | |
265e167c | 926 | %attr(755,root,root) %{_bindir}/llvm-dlltool |
827664e9 | 927 | %attr(755,root,root) %{_bindir}/llvm-dwarfdump |
0fd19552 | 928 | %attr(755,root,root) %{_bindir}/llvm-dwarfutil |
264482e1 | 929 | %attr(755,root,root) %{_bindir}/llvm-dwp |
8f8cf7a8 | 930 | %attr(755,root,root) %{_bindir}/llvm-exegesis |
8132e62b | 931 | %attr(755,root,root) %{_bindir}/llvm-extract |
f784323b | 932 | %attr(755,root,root) %{_bindir}/llvm-gsymutil |
ef49a424 JP |
933 | %attr(755,root,root) %{_bindir}/llvm-ifs |
934 | %attr(755,root,root) %{_bindir}/llvm-install-name-tool | |
d1e2ca8d | 935 | %attr(755,root,root) %{_bindir}/llvm-jitlink |
6df3b432 | 936 | %attr(755,root,root) %{_bindir}/llvm-lib |
40bef2a3 | 937 | %attr(755,root,root) %{_bindir}/llvm-libtool-darwin |
8132e62b | 938 | %attr(755,root,root) %{_bindir}/llvm-link |
d1e2ca8d | 939 | %attr(755,root,root) %{_bindir}/llvm-lipo |
3c402b7e | 940 | %attr(755,root,root) %{_bindir}/llvm-lto |
5013c7ea | 941 | %attr(755,root,root) %{_bindir}/llvm-lto2 |
8132e62b | 942 | %attr(755,root,root) %{_bindir}/llvm-mc |
8f8cf7a8 | 943 | %attr(755,root,root) %{_bindir}/llvm-mca |
f784323b | 944 | %attr(755,root,root) %{_bindir}/llvm-ml |
5013c7ea | 945 | %attr(755,root,root) %{_bindir}/llvm-modextract |
265e167c | 946 | %attr(755,root,root) %{_bindir}/llvm-mt |
8132e62b | 947 | %attr(755,root,root) %{_bindir}/llvm-nm |
23ae6496 | 948 | %attr(755,root,root) %{_bindir}/llvm-objcopy |
8132e62b | 949 | %attr(755,root,root) %{_bindir}/llvm-objdump |
5013c7ea | 950 | %attr(755,root,root) %{_bindir}/llvm-opt-report |
8d52ede4 | 951 | %attr(755,root,root) %{_bindir}/llvm-otool |
265e167c | 952 | %attr(755,root,root) %{_bindir}/llvm-pdbutil |
b883cf1e | 953 | %attr(755,root,root) %{_bindir}/llvm-profdata |
40bef2a3 | 954 | %attr(755,root,root) %{_bindir}/llvm-profgen |
8132e62b | 955 | %attr(755,root,root) %{_bindir}/llvm-ranlib |
23ae6496 | 956 | %attr(755,root,root) %{_bindir}/llvm-rc |
265e167c | 957 | %attr(755,root,root) %{_bindir}/llvm-readelf |
f981d747 | 958 | %attr(755,root,root) %{_bindir}/llvm-readobj |
ef49a424 | 959 | %attr(755,root,root) %{_bindir}/llvm-reduce |
0fd19552 | 960 | %attr(755,root,root) %{_bindir}/llvm-remark-size-diff |
827664e9 | 961 | %attr(755,root,root) %{_bindir}/llvm-rtdyld |
8d52ede4 | 962 | %attr(755,root,root) %{_bindir}/llvm-sim |
827664e9 | 963 | %attr(755,root,root) %{_bindir}/llvm-size |
264482e1 | 964 | %attr(755,root,root) %{_bindir}/llvm-split |
8f8cf7a8 | 965 | %attr(755,root,root) %{_bindir}/llvm-strip |
f981d747 | 966 | %attr(755,root,root) %{_bindir}/llvm-stress |
5013c7ea | 967 | %attr(755,root,root) %{_bindir}/llvm-strings |
1628dc68 | 968 | %attr(755,root,root) %{_bindir}/llvm-symbolizer |
8d52ede4 | 969 | %attr(755,root,root) %{_bindir}/llvm-tapi-diff |
827664e9 | 970 | %attr(755,root,root) %{_bindir}/llvm-tblgen |
90b20139 | 971 | %attr(755,root,root) %{_bindir}/llvm-tli-checker |
8f8cf7a8 | 972 | %attr(755,root,root) %{_bindir}/llvm-undname |
8d52ede4 | 973 | %attr(755,root,root) %{_bindir}/llvm-windres |
5013c7ea | 974 | %attr(755,root,root) %{_bindir}/llvm-xray |
8132e62b | 975 | %attr(755,root,root) %{_bindir}/opt |
d706a70d | 976 | %attr(755,root,root) %{_bindir}/sancov |
03073220 | 977 | %attr(755,root,root) %{_bindir}/sanstats |
40bef2a3 | 978 | %attr(755,root,root) %{_bindir}/split-file |
0fd19552 | 979 | %attr(755,root,root) %{_bindir}/tblgen-lsp-server |
4ba3b2b3 | 980 | %attr(755,root,root) %{_bindir}/verify-uselistorder |
b0068ae4 | 981 | %if %{with doc} |
a9beeab5 | 982 | %{_mandir}/man1/bugpoint.1* |
23ae6496 | 983 | %{_mandir}/man1/dsymutil.1* |
a7973f21 | 984 | %{_mandir}/man1/lit.1* |
a9beeab5 JB |
985 | %{_mandir}/man1/llc.1* |
986 | %{_mandir}/man1/lli.1* | |
d1e2ca8d | 987 | %{_mandir}/man1/llvm-addr2line.1* |
8132e62b JB |
988 | %{_mandir}/man1/llvm-ar.1* |
989 | %{_mandir}/man1/llvm-as.1* | |
990 | %{_mandir}/man1/llvm-bcanalyzer.1* | |
f981d747 | 991 | %{_mandir}/man1/llvm-cov.1* |
d1e2ca8d | 992 | %{_mandir}/man1/llvm-cxxfilt.1* |
0bc9c5c9 | 993 | %{_mandir}/man1/llvm-cxxmap.1* |
8132e62b JB |
994 | %{_mandir}/man1/llvm-diff.1* |
995 | %{_mandir}/man1/llvm-dis.1* | |
b883cf1e | 996 | %{_mandir}/man1/llvm-dwarfdump.1* |
0fd19552 | 997 | %{_mandir}/man1/llvm-dwarfutil.1* |
8f8cf7a8 | 998 | %{_mandir}/man1/llvm-exegesis.1* |
8132e62b | 999 | %{_mandir}/man1/llvm-extract.1* |
0fd19552 | 1000 | %{_mandir}/man1/llvm-ifs.1* |
40bef2a3 | 1001 | %{_mandir}/man1/llvm-install-name-tool.1* |
d706a70d | 1002 | %{_mandir}/man1/llvm-lib.1* |
40bef2a3 | 1003 | %{_mandir}/man1/llvm-libtool-darwin.1* |
8132e62b | 1004 | %{_mandir}/man1/llvm-link.1* |
d1e2ca8d | 1005 | %{_mandir}/man1/llvm-lipo.1* |
ef49a424 | 1006 | %{_mandir}/man1/llvm-locstats.1* |
8f8cf7a8 | 1007 | %{_mandir}/man1/llvm-mca.1* |
8132e62b | 1008 | %{_mandir}/man1/llvm-nm.1* |
d1e2ca8d | 1009 | %{_mandir}/man1/llvm-objcopy.1* |
0bc9c5c9 | 1010 | %{_mandir}/man1/llvm-objdump.1* |
8d52ede4 | 1011 | %{_mandir}/man1/llvm-otool.1* |
23ae6496 | 1012 | %{_mandir}/man1/llvm-pdbutil.1* |
b883cf1e | 1013 | %{_mandir}/man1/llvm-profdata.1* |
40bef2a3 | 1014 | %{_mandir}/man1/llvm-profgen.1* |
8132e62b | 1015 | %{_mandir}/man1/llvm-ranlib.1* |
d1e2ca8d | 1016 | %{_mandir}/man1/llvm-readelf.1* |
c999855f | 1017 | %{_mandir}/man1/llvm-readobj.1* |
0fd19552 | 1018 | %{_mandir}/man1/llvm-remark-size-diff.1* |
d1e2ca8d | 1019 | %{_mandir}/man1/llvm-size.1* |
f981d747 | 1020 | %{_mandir}/man1/llvm-stress.1* |
d1e2ca8d JP |
1021 | %{_mandir}/man1/llvm-strings.1* |
1022 | %{_mandir}/man1/llvm-strip.1* | |
1628dc68 | 1023 | %{_mandir}/man1/llvm-symbolizer.1* |
8d52ede4 | 1024 | %{_mandir}/man1/llvm-tblgen.1* |
90b20139 | 1025 | %{_mandir}/man1/llvm-tli-checker.1* |
a9beeab5 | 1026 | %{_mandir}/man1/opt.1* |
95bd4382 | 1027 | %{_mandir}/man1/tblgen.1* |
b0068ae4 | 1028 | %endif |
bc88141a | 1029 | |
8c514f23 JB |
1030 | %files libs |
1031 | %defattr(644,root,root,755) | |
2379ea21 | 1032 | %attr(755,root,root) %{_libdir}/LLVMgold.so |
9a23736f JB |
1033 | %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so |
1034 | # non-soname symlink | |
1035 | %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so | |
0fd19552 JP |
1036 | %attr(755,root,root) %{_libdir}/libLTO.so.15 |
1037 | %attr(755,root,root) %{_libdir}/libRemarks.so.15 | |
1038 | %attr(755,root,root) %{_libdir}/libclang-cpp.so.15 | |
8c514f23 | 1039 | |
bc88141a ER |
1040 | %files devel |
1041 | %defattr(644,root,root,755) | |
1042 | %attr(755,root,root) %{_bindir}/llvm-config | |
9a23736f | 1043 | %attr(755,root,root) %{_libdir}/libLLVM.so |
5013c7ea | 1044 | %attr(755,root,root) %{_libdir}/libLTO.so |
d1e2ca8d JP |
1045 | %attr(755,root,root) %{_libdir}/libRemarks.so |
1046 | %attr(755,root,root) %{_libdir}/libclang-cpp.so | |
d706a70d | 1047 | %{_libdir}/libLLVM*.a |
8132e62b JB |
1048 | %{_includedir}/llvm |
1049 | %{_includedir}/llvm-c | |
9ace1f65 | 1050 | %{_libdir}/cmake/llvm |
b0068ae4 | 1051 | %if %{with doc} |
8132e62b | 1052 | %{_mandir}/man1/llvm-config.1* |
b0068ae4 | 1053 | %endif |
bc88141a | 1054 | |
6df3b432 JB |
1055 | #%files doc |
1056 | #%defattr(644,root,root,755) | |
9556f4c9 ER |
1057 | |
1058 | %if %{with apidocs} | |
1059 | %files apidocs | |
1060 | %defattr(644,root,root,755) | |
1061 | %doc apidoc/* | |
1062 | %endif | |
1063 | ||
d27b2b77 JB |
1064 | %if %{with mlir} |
1065 | %files mlir | |
1066 | %defattr(644,root,root,755) | |
1067 | %attr(755,root,root) %{_bindir}/mlir-cpu-runner | |
d27b2b77 JB |
1068 | %attr(755,root,root) %{_bindir}/mlir-linalg-ods-yaml-gen |
1069 | %attr(755,root,root) %{_bindir}/mlir-lsp-server | |
1070 | %attr(755,root,root) %{_bindir}/mlir-opt | |
0fd19552 | 1071 | %attr(755,root,root) %{_bindir}/mlir-pdll-lsp-server* |
d27b2b77 JB |
1072 | %attr(755,root,root) %{_bindir}/mlir-reduce |
1073 | %attr(755,root,root) %{_bindir}/mlir-tblgen | |
1074 | %attr(755,root,root) %{_bindir}/mlir-translate | |
0fd19552 JP |
1075 | %attr(755,root,root) %{_libdir}/libMLIR.so.15 |
1076 | %attr(755,root,root) %{_libdir}/libmlir_async_runtime.so.15 | |
1077 | %attr(755,root,root) %{_libdir}/libmlir_c_runner_utils.so.15 | |
1078 | %attr(755,root,root) %{_libdir}/libmlir_runner_utils.so.15 | |
846aaadd | 1079 | %if %{with doc} |
d27b2b77 | 1080 | %{_mandir}/man1/mlir-tblgen.1* |
846aaadd | 1081 | %endif |
d27b2b77 JB |
1082 | |
1083 | %files mlir-devel | |
1084 | %defattr(644,root,root,755) | |
1085 | %attr(755,root,root) %{_libdir}/libMLIR.so | |
1086 | %attr(755,root,root) %{_libdir}/libmlir_async_runtime.so | |
1087 | %attr(755,root,root) %{_libdir}/libmlir_c_runner_utils.so | |
1088 | %attr(755,root,root) %{_libdir}/libmlir_runner_utils.so | |
1089 | %{_libdir}/libMLIR*.a | |
1090 | %{_includedir}/mlir | |
1091 | %{_includedir}/mlir-c | |
1092 | %{_libdir}/cmake/mlir | |
1093 | %endif | |
1094 | ||
b0068ae4 JB |
1095 | %if %{with polly} |
1096 | %files polly | |
1097 | %defattr(644,root,root,755) | |
8d52ede4 | 1098 | %doc tools/polly/{CREDITS.txt,LICENSE.TXT,README} tools/polly/www/{bugs,changelog,contributors}.html |
b0068ae4 | 1099 | %attr(755,root,root) %{_libdir}/LLVMPolly.so |
a5fe2ce1 | 1100 | %{?with_target_nvptx:%attr(755,root,root) %{_libdir}/libGPURuntime.so} |
b0068ae4 JB |
1101 | |
1102 | %files polly-devel | |
1103 | %defattr(644,root,root,755) | |
9a23736f JB |
1104 | %{_libdir}/libPolly.a |
1105 | %{_libdir}/libPollyISL.a | |
a5fe2ce1 | 1106 | %{?with_target_nvptx:%{_libdir}/libPollyPPCG.a} |
b0068ae4 | 1107 | %{_includedir}/polly |
265e167c | 1108 | %{_libdir}/cmake/polly |
b0068ae4 JB |
1109 | %endif |
1110 | ||
d997b14b | 1111 | %files -n clang |
bc88141a | 1112 | %defattr(644,root,root,755) |
827664e9 | 1113 | %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt} |
8132e62b JB |
1114 | %attr(755,root,root) %{_bindir}/clang |
1115 | %attr(755,root,root) %{_bindir}/clang++ | |
509439cf | 1116 | %attr(755,root,root) %{_bindir}/clang-%{abi} |
dd9350c7 | 1117 | %attr(755,root,root) %{_bindir}/clang-check |
6df3b432 | 1118 | %attr(755,root,root) %{_bindir}/clang-cl |
5013c7ea | 1119 | %attr(755,root,root) %{_bindir}/clang-cpp |
d1e2ca8d | 1120 | %attr(755,root,root) %{_bindir}/clang-doc |
1628dc68 | 1121 | %attr(755,root,root) %{_bindir}/clang-format |
90b20139 JP |
1122 | %attr(755,root,root) %{_bindir}/clang-linker-wrapper |
1123 | %attr(755,root,root) %{_bindir}/clang-nvlink-wrapper | |
5013c7ea | 1124 | %attr(755,root,root) %{_bindir}/clang-offload-bundler |
0fd19552 | 1125 | %attr(755,root,root) %{_bindir}/clang-offload-packager |
ef49a424 | 1126 | %attr(755,root,root) %{_bindir}/clang-offload-wrapper |
0fd19552 | 1127 | %attr(755,root,root) %{_bindir}/clang-pseudo |
8d52ede4 | 1128 | %attr(755,root,root) %{_bindir}/clang-repl |
6df3b432 | 1129 | %attr(755,root,root) %{_bindir}/git-clang-format |
5a7ac479 JB |
1130 | %dir %{_libdir}/clang |
1131 | %dir %{_libdir}/clang/%{version} | |
1132 | %{_libdir}/clang/%{version}/include | |
1133 | %if %{with rt} | |
9cb808e7 | 1134 | %ifarch %{x8664} x32 aarch64 |
ef49a424 JP |
1135 | %dir %{_libdir}/clang/%{version}/bin |
1136 | %attr(755,root,root) %{_libdir}/clang/%{version}/bin/hwasan_symbolize | |
19798eda | 1137 | %endif |
97d374d2 | 1138 | %ifarch %{ix86} %{x8664} aarch64 armv7hl armv7hnl |
3b28b31d | 1139 | %dir %{_libdir}/clang/%{version}/lib |
f3229f43 | 1140 | %dir %{_libdir}/clang/%{version}/lib/*-linux* |
3b28b31d JB |
1141 | %dir %{_libdir}/clang/%{version}/share |
1142 | %endif | |
1143 | %ifarch x32 | |
1144 | %if %{with multilib} | |
9eefd942 | 1145 | %dir %{_libdir}/clang/%{version}/lib |
f3229f43 | 1146 | %dir %{_libdir}/clang/%{version}/lib/*-linux* |
8f8cf7a8 | 1147 | %dir %{_libdir}/clang/%{version}/share |
9eefd942 | 1148 | %endif |
3b28b31d | 1149 | %endif |
9eefd942 | 1150 | %ifarch %{ix86} |
0fd19552 JP |
1151 | %{_libdir}/clang/%{version}/lib/i*86-*linux/clang_rt.*.o |
1152 | %{_libdir}/clang/%{version}/lib/i*86-*linux/libclang_rt.*.a | |
1153 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/i*86-*linux/libclang_rt.*.so | |
c6c890ee JB |
1154 | %endif |
1155 | %ifarch %{x8664} | |
0fd19552 JP |
1156 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/clang_rt.*.o |
1157 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.a | |
1158 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.so | |
1159 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.a.syms | |
3c402b7e | 1160 | %endif |
7bceddf8 | 1161 | %ifarch aarch64 |
0fd19552 JP |
1162 | %{_libdir}/clang/%{version}/lib/aarch64-*linux/clang_rt.*.o |
1163 | %{_libdir}/clang/%{version}/lib/aarch64-*linux/libclang_rt.*.a | |
1164 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/aarch64-*linux/libclang_rt.*.so | |
1165 | %{_libdir}/clang/%{version}/lib/aarch64-*linux/libclang_rt.*.a.syms | |
7bceddf8 | 1166 | %endif |
97d374d2 | 1167 | %ifarch armv7hl armv7hnl |
f3229f43 JP |
1168 | %{_libdir}/clang/%{version}/lib/armhf-*linux%{_gnu}/clang_rt.*.o |
1169 | %{_libdir}/clang/%{version}/lib/armhf-*linux%{_gnu}/libclang_rt.*.a | |
1170 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/armhf-*linux%{_gnu}/libclang_rt.*.so | |
1171 | %{_libdir}/clang/%{version}/lib/armhf-*linux%{_gnu}/libclang_rt.*.a.syms | |
97d374d2 | 1172 | %endif |
3b28b31d | 1173 | %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64 |
8d52ede4 | 1174 | %{_libdir}/clang/%{version}/share/asan_ignorelist.txt |
d706a70d | 1175 | %endif |
97d374d2 | 1176 | %ifarch %{ix86} %{x8664} mips64 aarch64 armv7hl armv7hnl |
8d52ede4 | 1177 | %{_libdir}/clang/%{version}/share/cfi_ignorelist.txt |
d706a70d | 1178 | %endif |
3b28b31d | 1179 | %ifarch %{x8664} aarch64 mips64 |
8f8cf7a8 | 1180 | %{_libdir}/clang/%{version}/share/dfsan_abilist.txt |
8d52ede4 | 1181 | %{_libdir}/clang/%{version}/share/msan_ignorelist.txt |
8f8cf7a8 | 1182 | %endif |
3b28b31d | 1183 | %ifarch %{x8664} aarch64 |
8d52ede4 | 1184 | %{_libdir}/clang/%{version}/share/hwasan_ignorelist.txt |
d706a70d | 1185 | %endif |
3b28b31d JB |
1186 | %ifarch x32 |
1187 | %if %{with multilib} | |
8d52ede4 JP |
1188 | %{_libdir}/clang/%{version}/share/asan_ignorelist.txt |
1189 | %{_libdir}/clang/%{version}/share/cfi_ignorelist.txt | |
3b28b31d | 1190 | %{_libdir}/clang/%{version}/share/dfsan_abilist.txt |
8d52ede4 JP |
1191 | %{_libdir}/clang/%{version}/share/msan_ignorelist.txt |
1192 | %{_libdir}/clang/%{version}/share/hwasan_ignorelist.txt | |
3b28b31d JB |
1193 | %endif |
1194 | %endif | |
5a7ac479 | 1195 | %endif |
3c402b7e JB |
1196 | %dir %{_datadir}/clang |
1197 | %{_datadir}/clang/clang-format-diff.py | |
d997b14b | 1198 | |
589b92f5 | 1199 | %if %{with rt} && %{with multilib} |
b0e18b64 | 1200 | %ifarch %{x8664} x32 |
9eefd942 JR |
1201 | %files -n clang-multilib |
1202 | %defattr(644,root,root,755) | |
0fd19552 JP |
1203 | %{_libdir}/clang/%{version}/lib/i386-*linux/clang_rt.*.o |
1204 | %{_libdir}/clang/%{version}/lib/i386-*linux/libclang_rt.*.a | |
1205 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/i386-*linux/libclang_rt.*.so | |
9eefd942 | 1206 | %endif |
b0e18b64 | 1207 | %ifarch x32 |
0fd19552 JP |
1208 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/clang_rt.*.o |
1209 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.a | |
1210 | %attr(755,root,root) %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.so | |
1211 | %{_libdir}/clang/%{version}/lib/x86_64-*linux/libclang_rt.*.a.syms | |
b0e18b64 | 1212 | %endif |
9eefd942 JR |
1213 | %endif |
1214 | ||
cb7d0198 JB |
1215 | %files -n clang-libs |
1216 | %defattr(644,root,root,755) | |
0fd19552 | 1217 | %attr(755,root,root) %{_libdir}/libclang.so.15 |
cb7d0198 JB |
1218 | %attr(755,root,root) %{_libdir}/libclang.so.*.*.* |
1219 | ||
1220 | %files -n clang-devel | |
1221 | %defattr(644,root,root,755) | |
1222 | %attr(755,root,root) %{_libdir}/libclang.so | |
1223 | %{_libdir}/libclang*.a | |
1224 | %{_includedir}/clang | |
1225 | %{_includedir}/clang-c | |
1226 | %{_includedir}/clang-tidy | |
1227 | %{_libdir}/cmake/clang | |
1228 | ||
1229 | %files -n clang-doc | |
1230 | %defattr(644,root,root,755) | |
1231 | %doc tools/clang/docs/*.{html,png,txt} | |
1232 | ||
1233 | %if %{with apidocs} | |
1234 | %files -n clang-apidocs | |
1235 | %defattr(644,root,root,755) | |
1236 | %doc clang-apidoc/* | |
1237 | %endif | |
1238 | ||
d997b14b | 1239 | %files -n clang-analyzer |
bc88141a | 1240 | %defattr(644,root,root,755) |
e25801fb JB |
1241 | %dir %{_libexecdir}/clang-analyzer |
1242 | # perl tools | |
1243 | %attr(755,root,root) %{_bindir}/scan-build | |
1244 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/c++-analyzer | |
1245 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/ccc-analyzer | |
1246 | %{_datadir}/scan-build | |
1247 | %{_mandir}/man1/scan-build.1* | |
1248 | # python tools | |
8d52ede4 JP |
1249 | %attr(755,root,root) %{_bindir}/analyze-build |
1250 | %attr(755,root,root) %{_bindir}/intercept-build | |
8d52ede4 | 1251 | %attr(755,root,root) %{_bindir}/scan-build-py |
d997b14b | 1252 | %attr(755,root,root) %{_bindir}/scan-view |
e25801fb JB |
1253 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/analyze-c++ |
1254 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/analyze-cc | |
1255 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/intercept-c++ | |
1256 | %attr(755,root,root) %{_libexecdir}/clang-analyzer/intercept-cc | |
8d52ede4 JP |
1257 | %{_prefix}/lib/libear |
1258 | %{_prefix}/lib/libscanbuild | |
634a3e5b | 1259 | %{_datadir}/scan-view |
8132e62b | 1260 | |
b0068ae4 JB |
1261 | %files -n clang-tools-extra |
1262 | %defattr(644,root,root,755) | |
9ace1f65 | 1263 | %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt} |
b0068ae4 | 1264 | %attr(755,root,root) %{_bindir}/clang-apply-replacements |
5013c7ea | 1265 | %attr(755,root,root) %{_bindir}/clang-change-namespace |
0bc9c5c9 | 1266 | %attr(755,root,root) %{_bindir}/clang-extdef-mapping |
03073220 | 1267 | %attr(755,root,root) %{_bindir}/clang-include-fixer |
ef49a424 | 1268 | %attr(755,root,root) %{_bindir}/clang-move |
b883cf1e | 1269 | %attr(755,root,root) %{_bindir}/clang-query |
23ae6496 | 1270 | %attr(755,root,root) %{_bindir}/clang-refactor |
4ba3b2b3 | 1271 | %attr(755,root,root) %{_bindir}/clang-rename |
5013c7ea | 1272 | %attr(755,root,root) %{_bindir}/clang-reorder-fields |
d1e2ca8d | 1273 | %attr(755,root,root) %{_bindir}/clang-scan-deps |
b0068ae4 | 1274 | %attr(755,root,root) %{_bindir}/clang-tidy |
265e167c | 1275 | %attr(755,root,root) %{_bindir}/clangd |
8f8cf7a8 | 1276 | %attr(755,root,root) %{_bindir}/diagtool |
03073220 | 1277 | %attr(755,root,root) %{_bindir}/find-all-symbols |
8f8cf7a8 | 1278 | %attr(755,root,root) %{_bindir}/hmaptool |
d706a70d | 1279 | %attr(755,root,root) %{_bindir}/modularize |
b0068ae4 | 1280 | %attr(755,root,root) %{_bindir}/pp-trace |
8d52ede4 | 1281 | %attr(755,root,root) %{_bindir}/run-clang-tidy |
03073220 | 1282 | %{_datadir}/clang/clang-include-fixer.py |
d706a70d | 1283 | %{_datadir}/clang/clang-tidy-diff.py |
03073220 | 1284 | %{_datadir}/clang/run-find-all-symbols.py |
b0068ae4 | 1285 | |
d13e7dd0 JB |
1286 | %files -n bash-completion-clang |
1287 | %defattr(644,root,root,755) | |
1288 | %{bash_compdir}/clang | |
1289 | ||
d27b2b77 JB |
1290 | %if %{with flang} |
1291 | %files -n flang | |
1292 | %defattr(644,root,root,755) | |
1293 | %doc tools/flang/{LICENSE.TXT,README.md} | |
1294 | %attr(755,root,root) %{_bindir}/f18 | |
1295 | %attr(755,root,root) %{_bindir}/f18-parse-demo | |
1296 | %attr(755,root,root) %{_bindir}/fir-opt | |
1297 | %attr(755,root,root) %{_bindir}/flang | |
1298 | %attr(755,root,root) %{_bindir}/tco | |
1299 | %dir %{_includedir}/flang | |
1300 | %{_includedir}/flang/Version.inc | |
1301 | %{_includedir}/flang/__fortran_*.mod | |
1302 | %{_includedir}/flang/ieee_*.mod | |
1303 | %{_includedir}/flang/iso_*.mod | |
1304 | %{_includedir}/flang/omp_lib*.mod | |
1305 | ||
1306 | %files -n flang-devel | |
1307 | %defattr(644,root,root,755) | |
1308 | %{_libdir}/libFIROptimizer.a | |
1309 | %{_libdir}/libFortran*.a | |
1310 | %{_includedir}/flang/Common | |
1311 | %{_includedir}/flang/Decimal | |
1312 | %{_includedir}/flang/Evaluate | |
1313 | %{_includedir}/flang/Frontend | |
1314 | %{_includedir}/flang/FrontendTool | |
1315 | %{_includedir}/flang/Lower | |
1316 | %{_includedir}/flang/Optimizer | |
1317 | %{_includedir}/flang/Parser | |
1318 | %{_includedir}/flang/Semantics | |
1319 | %{_includedir}/flang/ISO_Fortran_binding.h | |
1320 | %{_libdir}/cmake/flang | |
1321 | %endif | |
1322 | ||
ba1cf74d JB |
1323 | %files -n lld |
1324 | %defattr(644,root,root,755) | |
1325 | %doc tools/lld/{LICENSE.TXT,README.md} | |
d706a70d | 1326 | %attr(755,root,root) %{_bindir}/ld.lld |
23ae6496 | 1327 | %attr(755,root,root) %{_bindir}/ld64.lld |
ba1cf74d | 1328 | %attr(755,root,root) %{_bindir}/lld |
d706a70d | 1329 | %attr(755,root,root) %{_bindir}/lld-link |
d7447383 | 1330 | %attr(755,root,root) %{_bindir}/wasm-ld |
ba1cf74d JB |
1331 | |
1332 | %files -n lld-devel | |
1333 | %defattr(644,root,root,755) | |
d7447383 | 1334 | %{_libdir}/liblld[ACDEHMRWXY]*.a |
ba1cf74d | 1335 | %{_includedir}/lld |
f784323b | 1336 | %{_libdir}/cmake/lld |
ba1cf74d | 1337 | |
5a7ac479 JB |
1338 | %if %{with lldb} |
1339 | %files -n lldb | |
1340 | %defattr(644,root,root,755) | |
1341 | %attr(755,root,root) %{_bindir}/lldb | |
4522eb9a | 1342 | %attr(755,root,root) %{_bindir}/lldb-argdumper |
d1e2ca8d | 1343 | %attr(755,root,root) %{_bindir}/lldb-instr |
6df3b432 | 1344 | %attr(755,root,root) %{_bindir}/lldb-server |
0bc9c5c9 | 1345 | %attr(755,root,root) %{_bindir}/lldb-vscode |
6df3b432 | 1346 | %attr(755,root,root) %{_libdir}/liblldb.so.%{version} |
0fd19552 JP |
1347 | %attr(755,root,root) %ghost %{_libdir}/liblldb.so.15 |
1348 | %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.15 | |
40bef2a3 JP |
1349 | %dir %{py3_sitedir}/lldb |
1350 | %attr(755,root,root) %{py3_sitedir}/lldb/lldb-argdumper | |
1351 | %{py3_sitedir}/lldb/formatters | |
1352 | %{py3_sitedir}/lldb/utils | |
1353 | %{py3_sitedir}/lldb/__init__.py | |
1354 | %{py3_sitedir}/lldb/__pycache__ | |
1355 | %{py3_sitedir}/lldb/embedded_interpreter.py | |
8d52ede4 JP |
1356 | %dir %{py3_sitedir}/lldb/plugins |
1357 | %{py3_sitedir}/lldb/plugins/__pycache__ | |
1358 | %{py3_sitedir}/lldb/plugins/__init__.py | |
1359 | %{py3_sitedir}/lldb/plugins/scripted_process.py | |
93b7b046 | 1360 | %attr(755,root,root) %{py3_sitedir}/lldb/_lldb.cpython-*.so |
5a7ac479 JB |
1361 | |
1362 | %files -n lldb-devel | |
1363 | %defattr(644,root,root,755) | |
6df3b432 | 1364 | %attr(755,root,root) %{_libdir}/liblldb.so |
23ae6496 | 1365 | %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so |
5a7ac479 JB |
1366 | %{_includedir}/lldb |
1367 | %endif | |
1368 | ||
9556f4c9 | 1369 | %if %{with ocaml} |
d997b14b AM |
1370 | %files ocaml |
1371 | %defattr(644,root,root,755) | |
265e167c | 1372 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so |
5013c7ea | 1373 | %dir %{_libdir}/ocaml/llvm |
5013c7ea JB |
1374 | %{_libdir}/ocaml/llvm/llvm*.cma |
1375 | %{_libdir}/ocaml/llvm/llvm*.cmi | |
11b6f380 | 1376 | %{_libdir}/ocaml/META.llvm* |
d997b14b AM |
1377 | |
1378 | %files ocaml-devel | |
1379 | %defattr(644,root,root,755) | |
5013c7ea JB |
1380 | %{_libdir}/ocaml/llvm/libllvm*.a |
1381 | %{_libdir}/ocaml/llvm/llvm*.a | |
90b20139 JP |
1382 | %{_libdir}/ocaml/llvm/llvm*.cmt |
1383 | %{_libdir}/ocaml/llvm/llvm*.cmti | |
5013c7ea JB |
1384 | %{_libdir}/ocaml/llvm/llvm*.cmx |
1385 | %{_libdir}/ocaml/llvm/llvm*.cmxa | |
1386 | %{_libdir}/ocaml/llvm/llvm*.mli | |
9556f4c9 ER |
1387 | |
1388 | %files ocaml-doc | |
1389 | %defattr(644,root,root,755) | |
6df3b432 | 1390 | %doc ocamldocs/* |
9556f4c9 | 1391 | %endif |
d7447383 JR |
1392 | |
1393 | %files opt-viewer | |
1394 | %defattr(644,root,root,755) | |
1395 | %{_datadir}/opt-viewer | |
1396 | ||
1397 | %files -n vim-plugin-clang | |
1398 | %defattr(644,root,root,755) | |
1399 | %{_datadir}/clang/clang-format.py | |
1400 | %{_datadir}/clang/clang-rename.py |