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