]> git.pld-linux.org Git - packages/llvm.git/blob - llvm.spec
ocaml rebuild
[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_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
54 %bcond_without  target_ve               # VE target support
55 %bcond_without  target_webassembly      # WebAssembly target support
56 %bcond_without  target_x86              # X86 target support
57 %bcond_without  target_xcore            # XCore target support
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
62
63 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
64 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
65 %undefine       with_ocaml
66 %endif
67
68 %ifarch armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl
69 %undefine       with_rt
70 %endif
71
72 %ifarch %{arm} aarch64
73 %define         with_lowmem             1
74 %endif
75
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;}
77
78 %if %{without mlir}
79 %undefine       with_flang
80 %endif
81
82 Summary:        The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
83 Summary(pl.UTF-8):      Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
84 Name:           llvm
85 Version:        15.0.2
86 Release:        2
87 License:        Apache 2.0 with LLVM exceptions
88 Group:          Development/Languages
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
91 # Source0-md5:  e3a27e5cf58b146cfd2e5c9755030298
92 Source1:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
93 # Source1-md5:  f2679a17d6be9d1a2298f546c0b4e844
94 Source2:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
95 # Source2-md5:  1f990209b6c102e41a45bec854b76fa2
96 Source3:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
97 # Source3-md5:  4a02bc28b793a698342debdd01e65ce3
98 Source4:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
99 # Source4-md5:  34a8dc88cce024f9668746f849fe3c35
100 Source5:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
101 # Source5-md5:  45741472f0b8a0f4261f4599a1387acd
102 Source6:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
103 # Source6-md5:  53e64e6eeda6705fb13e1d233f79def4
104 Source7:        https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/flang-%{version}.src.tar.xz
105 # Source7-md5:  40d4b36d5b3b954eff378b3d6f19549c
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
107 Source8:        mlir-%{version}.tar.xz
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
111 Patch1:         %{name}-pld.patch
112 Patch2:         %{name}-python-modules.patch
113 Patch3:         x32-gcc-toolchain.patch
114 Patch4:         cmake-buildtype.patch
115 Patch5:         %{name}-ocaml-shared.patch
116 Patch6:         %{name}-flang.patch
117 Patch7:         llvm12-build_fixes.patch
118 Patch8:         %{name}-selective_bindings.patch
119 Patch9:         %{name}-libexecdir.patch
120 Patch10:        compiler-rt-paths.patch
121 Patch11:        cmake-utils-path-override.patch
122 Patch12:        x32-compiler-rt.patch
123 Patch13:        atomic.patch
124 URL:            https://llvm.org/
125 BuildRequires:  bash
126 BuildRequires:  binutils-devel
127 BuildRequires:  bison
128 BuildRequires:  cmake >= 3.13.4
129 BuildRequires:  flex
130 BuildRequires:  groff
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-pygments >= 2.0
149 BuildRequires:  rpm-build >= 4.6
150 BuildRequires:  rpm-pythonprov
151 BuildRequires:  rpmbuild(macros) >= 1.742
152 %{?with_doc:BuildRequires:      sphinx-pdg}
153 BuildRequires:  tar >= 1:1.22
154 BuildRequires:  xar-devel >= 1.6
155 BuildRequires:  xz
156 %{?with_z3:BuildRequires:       z3-devel >= 4.7.1}
157 BuildRequires:  zlib-devel
158 %if %{with apidocs}
159 BuildRequires:  doxygen
160 BuildRequires:  graphviz
161 %endif
162 %if %{with tests}
163 BuildRequires:  dejagnu
164 BuildRequires:  tcl-devel
165 %endif
166 %if %{with rt} && %{with multilib}
167 %ifarch %{x8664}
168 BuildRequires:  gcc-c++-multilib-32
169 BuildRequires:  glibc-devel(ix86)
170 BuildRequires:  libstdc++-multilib-32-devel
171 %endif
172 %ifarch x32
173 BuildRequires:  gcc-c++-multilib-32
174 BuildRequires:  gcc-c++-multilib-64
175 BuildRequires:  glibc-devel(x86_64)
176 BuildRequires:  glibc-devel(ix86)
177 BuildRequires:  libstdc++-multilib-32-devel
178 BuildRequires:  libstdc++-multilib-64-devel
179 %endif
180 %endif
181 %if %{with lldb}
182 BuildRequires:  epydoc
183 %ifarch i386 i486 %{arm}
184 BuildRequires:  libatomic-devel
185 %endif
186 BuildRequires:  libxml2-devel >= 2
187 BuildRequires:  lua-devel
188 BuildRequires:  ncurses-ext-devel
189 BuildRequires:  python3-devel >= 1:3.2
190 %{?with_doc:BuildRequires:      python3-recommonmark}
191 BuildRequires:  swig-python >= 3.0.11
192 BuildRequires:  xz-devel
193 %endif
194 %if %{with polly}
195 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
196 # private copy in polly/lib/External/isl
197 #BuildRequires: isl-devel >= 0.22.1
198 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
199 %{?with_target_nvptx:BuildRequires:     ocl-icd-libOpenCL-devel}
200 %endif
201 %if %{with ocaml}
202 BuildConflicts: llvm-ocaml
203 %endif
204 Requires:       %{name}-libs = %{version}-%{release}
205 # LLVM is not supported on PPC64
206 # http://llvm.org/bugs/show_bug.cgi?id=3729
207 ExcludeArch:    ppc64
208 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
209
210 %define         abi     15
211 %define         _sysconfdir     /etc/%{name}
212
213 %define         specflags_ppc   -fno-var-tracking-assignments
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
221 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
222 # use -gsplit-dwarf only when building packages with debuginfo
223 # to avoid excessive disk space usage
224 %if 0%{?_enable_debug_packages}
225 %define         specflags       -gsplit-dwarf
226 %endif
227
228 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
229 %define         _noautostrip    .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
230
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
234 %define         filterout_c     -fvar-tracking-assignments
235 %define         filterout_cxx   -fvar-tracking-assignments -Werror=format-security
236 %define         filterout_ccpp  -fvar-tracking-assignments
237
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
243 currently supports compilation of C and C++ programs using clang
244 frontend.
245
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
251 kompilację programów w C i C++ przy użyciu frontendu clang.
252
253 %package libs
254 Summary:        LLVM shared libraries
255 Summary(pl.UTF-8):      Biblioteki współdzielone LLVM-a
256 Group:          Libraries
257 Conflicts:      llvm < 3.2
258
259 %description libs
260 LLVM shared libraries.
261
262 %description libs -l pl.UTF-8
263 Biblioteki współdzielone LLVM-a.
264
265 %package devel
266 Summary:        Static libraries and header files for LLVM
267 Summary(pl.UTF-8):      Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
268 Group:          Development/Languages
269 Requires:       %{name}-libs = %{version}-%{release}
270 Requires:       libstdc++-devel >= 6:3.4
271
272 %description devel
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.
280
281 %package doc
282 Summary:        Documentation for LLVM
283 Summary(pl.UTF-8):      Dokumentacja do LLVM-a
284 Group:          Documentation
285 # does not require base
286
287 %description doc
288 Documentation for the LLVM compiler infrastructure.
289
290 %description doc -l pl.UTF-8
291 Dokumentacja do infrastruktury kompilatorów LLVM.
292
293 %package apidocs
294 Summary:        API documentation for LLVM
295 Summary(pl.UTF-8):      Dokumentacja API LLVM-a
296 Group:          Development/Languages
297 Requires:       %{name}-doc = %{version}-%{release}
298
299 %description apidocs
300 API documentation for the LLVM compiler infrastructure.
301
302 %description apidocs -l pl.UTF-8
303 Dokumentacja API infrastruktury kompilatorów LLVM.
304
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
333 %package polly
334 Summary:        Polyhedral optimizations for LLVM
335 Summary(pl.UTF-8):      Optymalizacje wielościanowe dla LLVM-a
336 Group:          Development/Tools
337 URL:            https://polly.llvm.org/
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
356 URL:            https://polly.llvm.org/
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
366 %package -n clang
367 Summary:        A C language family frontend for LLVM
368 Summary(pl.UTF-8):      Frontend LLVM-a do języków z rodziny C
369 Group:          Development/Languages
370 URL:            https://clang.llvm.org/
371 Requires:       %{name} = %{version}-%{release}
372 Requires:       clang-libs = %{version}-%{release}
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
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
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
395 Group:          Development/Languages
396 URL:            https://clang.llvm.org/
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
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/
428
429 %description -n clang-libs
430 Clang shared libraries.
431
432 %description -n clang-libs -l pl.UTF-8
433 Biblioteki współdzielone Clanga.
434
435 %package -n clang-devel
436 Summary:        Header files for Clang
437 Summary(pl.UTF-8):      Pliki nagłówkowe Clanga
438 Group:          Development/Languages
439 URL:            https://clang.llvm.org/
440 Requires:       %{name}-devel = %{version}-%{release}
441 Requires:       clang = %{version}-%{release}
442 %{?with_polly:Requires: llvm-polly-devel = %{version}-%{release}}
443
444 %description -n clang-devel
445 This package contains header files for the Clang compiler.
446
447 %description -n clang-devel -l pl.UTF-8
448 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
449
450 %package -n clang-doc
451 Summary:        Documentation for Clang
452 Summary(pl.UTF-8):      Dokumentacja do Clanga
453 URL:            https://clang.llvm.org/
454 Group:          Documentation
455 Requires:       %{name} = %{version}-%{release}
456
457 %description -n clang-doc
458 Documentation for the Clang compiler front-end.
459
460 %description -n clang-doc -l pl.UTF-8
461 Dokumentacja do frontendu kompilatora Clang.
462
463 %package -n clang-apidocs
464 Summary:        API documentation for Clang
465 Summary(pl.UTF-8):      Dokumentacja API Clanga
466 URL:            https://clang.llvm.org/
467 Group:          Development/Languages
468 Requires:       clang-doc = %{version}-%{release}
469
470 %description -n clang-apidocs
471 API documentation for the Clang compiler.
472
473 %description -n clang-apidocs -l pl.UTF-8
474 Dokumentacja API kompilatora Clang.
475
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
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
502 URL:            https://clang.llvm.org/docs/ClangTools.html
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
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
515 Requires:       bash-completion >= 1:2.0
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
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
553 %package -n lld
554 Summary:        The LLVM linker
555 Summary(pl.UTF-8):      Konsolidator z projektu LLVM
556 Group:          Development/Libraries
557 URL:            https://lld.llvm.org/
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
571 URL:            https://lld.llvm.org/
572 Requires:       %{name}-devel = %{version}-%{release}
573 Requires:       xar-devel >= 1.6
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
581 %package -n lldb
582 Summary:        Next generation high-performance debugger
583 Summary(pl.UTF-8):      Wydajny debugger nowej generacji
584 Group:          Development/Debuggers
585 URL:            https://lldb.llvm.org/
586 Requires:       %{name} = %{version}-%{release}
587 Requires:       python3-six
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
602 Summary:        Development files for LLDB debugger
603 Summary(pl.UTF-8):      Pliki programistyczne debuggera LLDB
604 Group:          Development/Libraries
605 URL:            https://lldb.llvm.org/
606 Requires:       %{name}-devel = %{version}-%{release}
607 Requires:       clang-devel = %{version}-%{release}
608 Requires:       lldb = %{version}-%{release}
609
610 %description -n lldb-devel
611 Development files for LLDB debugger.
612
613 %description -n lldb-devel -l pl.UTF-8
614 Pliki programistyczne debuggera LLDB.
615
616 %package ocaml
617 Summary:        OCaml binding for LLVM
618 Summary(pl.UTF-8):      Wiązanie OCamla do LLVM-a
619 Group:          Libraries
620 Requires:       %{name} = %{version}-%{release}
621 %if %{with ocaml}
622 %requires_eq    ocaml-runtime
623 %endif
624
625 %description ocaml
626 OCaml binding for LLVM.
627
628 %description ocaml -l pl.UTF-8
629 Wiązanie OCamla do LLVM-a.
630
631 %package ocaml-devel
632 Summary:        Development files for LLVM OCaml binding
633 Summary(pl.UTF-8):      Pliki programistyczne wiązania OCamla do LLVM-a
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
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
646 %package ocaml-doc
647 Summary:        Documentation for LLVM's OCaml binding
648 Summary(pl.UTF-8):      Dokumentacja wiązania OCamla do LLVM-a
649 Group:          Documentation
650 Requires:       %{name}-ocaml = %{version}-%{release}
651
652 %description ocaml-doc
653 HTML documentation for LLVM's OCaml binding.
654
655 %description ocaml-doc -l pl.UTF-8
656 Dokumentacja HTML wiązania OCamla do LLVM-a.
657
658 %package opt-viewer
659 Summary:        Optimization records visualization tools
660 Summary(pl.UTF-8):      Narzędzia do wizualizacji rekordów optymalizacji
661 Group:          Development/Tools
662 Requires:       %{name} = %{version}
663 BuildArch:      noarch
664
665 %description opt-viewer
666 Optimization records visualization tools.
667
668 %description opt-viewer -l pl.UTF-8
669 Narzędzia do wizualizacji rekordów optymalizacji.
670
671 %package -n vim-plugin-clang
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
674 Group:          Applications/Editors/Vim
675 Requires:       vim-rt >= 4:7.0
676 BuildArch:      noarch
677
678 %description -n vim-plugin-clang
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.
683
684 %prep
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
686 %{__mv} clang-%{version}.src tools/clang
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}
690 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
691 %{__mv} lld-%{version}.src tools/lld
692 %if %{with flang}
693 %{__mv} flang-%{version}.src tools/flang
694 %endif
695 %if %{with mlir}
696 %{__mv} mlir tools/mlir
697 %endif
698 %{__mv} cmake-%{version}.src cmake-utils
699
700 %patch1 -p1
701 %patch2 -p1
702 %patch3 -p1
703 %patch4 -p1
704 %patch5 -p1
705 %if %{with flang}
706 %patch6 -p1
707 %endif
708 %patch7 -p1
709 %patch8 -p1
710 %patch9 -p1
711 %if %{with rt}
712 %patch10 -p1
713 %patch12 -p1
714 %endif
715 %patch11 -p1
716 %patch13 -p1
717
718 grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{
719         s,^#!.*bin/env python3\?,#!%{__python3},
720         s,^#!.*bin/env perl,#!%{__perl},
721 }'
722
723 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
724         s,^#!.*bin/python.*,#!%{__python3},
725 }'
726
727 %if %{with flang}
728 %{__sed} -i -e '1s,/usr/bin/env bash,/bin/bash,' tools/flang/tools/f18/flang.in
729 %endif
730
731 %build
732 install -d build
733
734 # Disabling assertions now, rec. by pure and needed for OpenGTL
735 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
736 cd build
737 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
738
739 %if %{with lowmem}
740 export CFLAGS="%{rpmcflags} -g0"
741 export CXXFLAGS="%{rpmcxxflags} -g0"
742 if echo 'int main(){}' | %{__cc} -x c %{rpmldflags} -Wl,--reduce-memory-overheads -o /dev/null - > /dev/null 2>&1; then
743 export LDFLAGS="%{rpmldflags} -Wl,--reduce-memory-overheads"
744 fi
745 %endif
746
747 %cmake .. \
748         -DBUILD_SHARED_LIBS:BOOL=OFF \
749         -DENABLE_LINKER_BUILD_ID:BOOL=ON \
750         -DLLVM_COMMON_CMAKE_UTILS="%{_builddir}/%{buildsubdir}/cmake-utils" \
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 \
755         -DLLVM_INSTALL_PACKAGE_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_libdir}/cmake/llvm") \
756         -DLLVM_TOOLS_INSTALL_DIR=%(realpath -m "--relative-to=%{_prefix}" "%{_bindir}") \
757 %if %{with apidocs}
758         -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
759 %endif
760         %{?with_cxxmodules:-DLLVM_ENABLE_MODULES:BOOL=ON} \
761         -DLLVM_ENABLE_PIC:BOOL=ON \
762         -DLLVM_ENABLE_RTTI:BOOL=ON \
763 %if %{with doc}
764         -DLLVM_ENABLE_SPHINX:BOOL=ON \
765 %endif
766         -DLLVM_INCLUDE_BENCHMARKS:BOOL=OFF \
767         %{?with_z3:-DLLVM_ENABLE_Z3_SOLVER:BOOL=ON} \
768 %if "%{_lib}" == "lib64"
769         -DLLVM_LIBDIR_SUFFIX:STRING=64 \
770 %endif
771 %if "%{_lib}" == "libx32"
772         -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
773 %endif
774         -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
775         -DLLVM_TARGET_ARCH:STRING=%{_target_base_arch} \
776         -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=%{_target_platform} \
777 %if %{with lowmem}
778         -DLLVM_PARALLEL_LINK_JOBS:STRING=1 \
779 %endif
780         -DLLVM_TARGETS_TO_BUILD="%{targets_to_build}" \
781 %if %{with polly}
782         %{cmake_on_off target_nvptx POLLY_ENABLE_GPGPU_CODEGEN} \
783 %endif
784         -DSPHINX_WARNINGS_AS_ERRORS=OFF \
785 %if %{with rt}
786 %ifarch x32
787         -DCOMPILER_RT_BUILD_MEMPROF:BOOL=OFF
788 %endif
789 %endif
790
791 %{__make} \
792         VERBOSE=1 \
793         OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
794
795 %if %{with tests}
796 %{__make} check 2>&1 | tee llvm-testlog.txt
797 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
798 %endif
799
800 %if %{with doc}
801 %{__make} -C docs docs-llvm-html
802 %{__make} -C docs docs-llvm-man
803 %if %{with ocaml}
804 %{__make} -C docs ocaml_doc
805 %endif
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
809 # workaround failed import of _lldb
810 cp -pnL %{_lib}/liblldb.so tools/lldb/docs/lldb/_lldb.so
811 %{__make} \
812         LD_LIBRARY_PATH=$(pwd)/%{_lib} \
813         -C tools/lldb/docs lldb-python-doc-package
814 %{__make} -C tools/lldb/docs lldb-cpp-doc
815 %endif
816
817 %install
818 rm -rf $RPM_BUILD_ROOT
819
820 %{__make} -j1 -C build install \
821         DESTDIR=$RPM_BUILD_ROOT
822
823 # only some .pyc files are created by make install
824 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
825 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
826
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
831 %py3_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
832 %py3_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
833
834 # not installed by cmake buildsystem
835 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
836
837 %if %{with doc}
838 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
839 # these tools are not installed
840 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,clang-tblgen,lldb-tblgen}.1
841 # make links
842 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
843 %endif
844
845 # Move documentation back to build directory
846 %if %{with ocaml}
847 rm -rf ocamldocs
848 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
849 %endif
850
851 # and separate the apidoc
852 %if %{with apidocs}
853 rm -rf clang-apidoc
854 cp -a build/tools/clang/docs/html clang-apidoc
855 %endif
856
857 # And prepare Clang documentation
858 rm -rf clang-docs
859 install -d clang-docs
860 for f in LICENSE.TXT NOTES.txt README.txt; do
861         ln tools/clang/$f clang-docs
862 done
863
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
867 %{__rm} $RPM_BUILD_ROOT%{_bindir}/c-index-test
868 # not this OS
869 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
870 # use system six
871 %{?with_lldb:%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/{,__pycache__/}six*.py*}
872 # it seems it is used internally by an extra clang tool
873 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
874
875 # disable completeness check incompatible with split packaging
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
886
887 %clean
888 rm -rf $RPM_BUILD_ROOT
889
890 %post   libs -p /sbin/ldconfig
891 %postun libs -p /sbin/ldconfig
892
893 %post   mlir -p /sbin/ldconfig
894 %postun mlir -p /sbin/ldconfig
895
896 %post   -n clang-libs -p /sbin/ldconfig
897 %postun -n clang-libs -p /sbin/ldconfig
898
899 %post   -n lldb -p /sbin/ldconfig
900 %postun -n lldb -p /sbin/ldconfig
901
902 %files
903 %defattr(644,root,root,755)
904 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
905 %attr(755,root,root) %{_bindir}/bugpoint
906 %attr(755,root,root) %{_bindir}/dsymutil
907 %attr(755,root,root) %{_bindir}/llc
908 %attr(755,root,root) %{_bindir}/lli
909 %attr(755,root,root) %{_bindir}/llvm-addr2line
910 %attr(755,root,root) %{_bindir}/llvm-ar
911 %attr(755,root,root) %{_bindir}/llvm-as
912 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
913 %attr(755,root,root) %{_bindir}/llvm-bitcode-strip
914 %attr(755,root,root) %{_bindir}/llvm-c-test
915 %attr(755,root,root) %{_bindir}/llvm-cat
916 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
917 %attr(755,root,root) %{_bindir}/llvm-cov
918 %attr(755,root,root) %{_bindir}/llvm-cvtres
919 %attr(755,root,root) %{_bindir}/llvm-cxxdump
920 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
921 %attr(755,root,root) %{_bindir}/llvm-cxxmap
922 %attr(755,root,root) %{_bindir}/llvm-debuginfod
923 %attr(755,root,root) %{_bindir}/llvm-debuginfod-find
924 %attr(755,root,root) %{_bindir}/llvm-diff
925 %attr(755,root,root) %{_bindir}/llvm-dis
926 %attr(755,root,root) %{_bindir}/llvm-dlltool
927 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
928 %attr(755,root,root) %{_bindir}/llvm-dwarfutil
929 %attr(755,root,root) %{_bindir}/llvm-dwp
930 %attr(755,root,root) %{_bindir}/llvm-exegesis
931 %attr(755,root,root) %{_bindir}/llvm-extract
932 %attr(755,root,root) %{_bindir}/llvm-gsymutil
933 %attr(755,root,root) %{_bindir}/llvm-ifs
934 %attr(755,root,root) %{_bindir}/llvm-install-name-tool
935 %attr(755,root,root) %{_bindir}/llvm-jitlink
936 %attr(755,root,root) %{_bindir}/llvm-lib
937 %attr(755,root,root) %{_bindir}/llvm-libtool-darwin
938 %attr(755,root,root) %{_bindir}/llvm-link
939 %attr(755,root,root) %{_bindir}/llvm-lipo
940 %attr(755,root,root) %{_bindir}/llvm-lto
941 %attr(755,root,root) %{_bindir}/llvm-lto2
942 %attr(755,root,root) %{_bindir}/llvm-mc
943 %attr(755,root,root) %{_bindir}/llvm-mca
944 %attr(755,root,root) %{_bindir}/llvm-ml
945 %attr(755,root,root) %{_bindir}/llvm-modextract
946 %attr(755,root,root) %{_bindir}/llvm-mt
947 %attr(755,root,root) %{_bindir}/llvm-nm
948 %attr(755,root,root) %{_bindir}/llvm-objcopy
949 %attr(755,root,root) %{_bindir}/llvm-objdump
950 %attr(755,root,root) %{_bindir}/llvm-opt-report
951 %attr(755,root,root) %{_bindir}/llvm-otool
952 %attr(755,root,root) %{_bindir}/llvm-pdbutil
953 %attr(755,root,root) %{_bindir}/llvm-profdata
954 %attr(755,root,root) %{_bindir}/llvm-profgen
955 %attr(755,root,root) %{_bindir}/llvm-ranlib
956 %attr(755,root,root) %{_bindir}/llvm-rc
957 %attr(755,root,root) %{_bindir}/llvm-readelf
958 %attr(755,root,root) %{_bindir}/llvm-readobj
959 %attr(755,root,root) %{_bindir}/llvm-reduce
960 %attr(755,root,root) %{_bindir}/llvm-remark-size-diff
961 %attr(755,root,root) %{_bindir}/llvm-rtdyld
962 %attr(755,root,root) %{_bindir}/llvm-sim
963 %attr(755,root,root) %{_bindir}/llvm-size
964 %attr(755,root,root) %{_bindir}/llvm-split
965 %attr(755,root,root) %{_bindir}/llvm-strip
966 %attr(755,root,root) %{_bindir}/llvm-stress
967 %attr(755,root,root) %{_bindir}/llvm-strings
968 %attr(755,root,root) %{_bindir}/llvm-symbolizer
969 %attr(755,root,root) %{_bindir}/llvm-tapi-diff
970 %attr(755,root,root) %{_bindir}/llvm-tblgen
971 %attr(755,root,root) %{_bindir}/llvm-tli-checker
972 %attr(755,root,root) %{_bindir}/llvm-undname
973 %attr(755,root,root) %{_bindir}/llvm-windres
974 %attr(755,root,root) %{_bindir}/llvm-xray
975 %attr(755,root,root) %{_bindir}/opt
976 %attr(755,root,root) %{_bindir}/sancov
977 %attr(755,root,root) %{_bindir}/sanstats
978 %attr(755,root,root) %{_bindir}/split-file
979 %attr(755,root,root) %{_bindir}/tblgen-lsp-server
980 %attr(755,root,root) %{_bindir}/verify-uselistorder
981 %if %{with doc}
982 %{_mandir}/man1/bugpoint.1*
983 %{_mandir}/man1/dsymutil.1*
984 %{_mandir}/man1/lit.1*
985 %{_mandir}/man1/llc.1*
986 %{_mandir}/man1/lli.1*
987 %{_mandir}/man1/llvm-addr2line.1*
988 %{_mandir}/man1/llvm-ar.1*
989 %{_mandir}/man1/llvm-as.1*
990 %{_mandir}/man1/llvm-bcanalyzer.1*
991 %{_mandir}/man1/llvm-cov.1*
992 %{_mandir}/man1/llvm-cxxfilt.1*
993 %{_mandir}/man1/llvm-cxxmap.1*
994 %{_mandir}/man1/llvm-diff.1*
995 %{_mandir}/man1/llvm-dis.1*
996 %{_mandir}/man1/llvm-dwarfdump.1*
997 %{_mandir}/man1/llvm-dwarfutil.1*
998 %{_mandir}/man1/llvm-exegesis.1*
999 %{_mandir}/man1/llvm-extract.1*
1000 %{_mandir}/man1/llvm-ifs.1*
1001 %{_mandir}/man1/llvm-install-name-tool.1*
1002 %{_mandir}/man1/llvm-lib.1*
1003 %{_mandir}/man1/llvm-libtool-darwin.1*
1004 %{_mandir}/man1/llvm-link.1*
1005 %{_mandir}/man1/llvm-lipo.1*
1006 %{_mandir}/man1/llvm-locstats.1*
1007 %{_mandir}/man1/llvm-mca.1*
1008 %{_mandir}/man1/llvm-nm.1*
1009 %{_mandir}/man1/llvm-objcopy.1*
1010 %{_mandir}/man1/llvm-objdump.1*
1011 %{_mandir}/man1/llvm-otool.1*
1012 %{_mandir}/man1/llvm-pdbutil.1*
1013 %{_mandir}/man1/llvm-profdata.1*
1014 %{_mandir}/man1/llvm-profgen.1*
1015 %{_mandir}/man1/llvm-ranlib.1*
1016 %{_mandir}/man1/llvm-readelf.1*
1017 %{_mandir}/man1/llvm-readobj.1*
1018 %{_mandir}/man1/llvm-remark-size-diff.1*
1019 %{_mandir}/man1/llvm-size.1*
1020 %{_mandir}/man1/llvm-stress.1*
1021 %{_mandir}/man1/llvm-strings.1*
1022 %{_mandir}/man1/llvm-strip.1*
1023 %{_mandir}/man1/llvm-symbolizer.1*
1024 %{_mandir}/man1/llvm-tblgen.1*
1025 %{_mandir}/man1/llvm-tli-checker.1*
1026 %{_mandir}/man1/opt.1*
1027 %{_mandir}/man1/tblgen.1*
1028 %endif
1029
1030 %files libs
1031 %defattr(644,root,root,755)
1032 %attr(755,root,root) %{_libdir}/LLVMgold.so
1033 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
1034 # non-soname symlink
1035 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
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
1039
1040 %files devel
1041 %defattr(644,root,root,755)
1042 %attr(755,root,root) %{_bindir}/llvm-config
1043 %attr(755,root,root) %{_libdir}/libLLVM.so
1044 %attr(755,root,root) %{_libdir}/libLTO.so
1045 %attr(755,root,root) %{_libdir}/libRemarks.so
1046 %attr(755,root,root) %{_libdir}/libclang-cpp.so
1047 %{_libdir}/libLLVM*.a
1048 %{_includedir}/llvm
1049 %{_includedir}/llvm-c
1050 %{_libdir}/cmake/llvm
1051 %if %{with doc}
1052 %{_mandir}/man1/llvm-config.1*
1053 %endif
1054
1055 #%files doc
1056 #%defattr(644,root,root,755)
1057
1058 %if %{with apidocs}
1059 %files apidocs
1060 %defattr(644,root,root,755)
1061 %doc apidoc/*
1062 %endif
1063
1064 %if %{with mlir}
1065 %files mlir
1066 %defattr(644,root,root,755)
1067 %attr(755,root,root) %{_bindir}/mlir-cpu-runner
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
1071 %attr(755,root,root) %{_bindir}/mlir-pdll-lsp-server*
1072 %attr(755,root,root) %{_bindir}/mlir-reduce
1073 %attr(755,root,root) %{_bindir}/mlir-tblgen
1074 %attr(755,root,root) %{_bindir}/mlir-translate
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
1079 %if %{with doc}
1080 %{_mandir}/man1/mlir-tblgen.1*
1081 %endif
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
1095 %if %{with polly}
1096 %files polly
1097 %defattr(644,root,root,755)
1098 %doc tools/polly/{CREDITS.txt,LICENSE.TXT,README} tools/polly/www/{bugs,changelog,contributors}.html
1099 %attr(755,root,root) %{_libdir}/LLVMPolly.so
1100 %{?with_target_nvptx:%attr(755,root,root) %{_libdir}/libGPURuntime.so}
1101
1102 %files polly-devel
1103 %defattr(644,root,root,755)
1104 %{_libdir}/libPolly.a
1105 %{_libdir}/libPollyISL.a
1106 %{?with_target_nvptx:%{_libdir}/libPollyPPCG.a}
1107 %{_includedir}/polly
1108 %{_libdir}/cmake/polly
1109 %endif
1110
1111 %files -n clang
1112 %defattr(644,root,root,755)
1113 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
1114 %attr(755,root,root) %{_bindir}/clang
1115 %attr(755,root,root) %{_bindir}/clang++
1116 %attr(755,root,root) %{_bindir}/clang-%{abi}
1117 %attr(755,root,root) %{_bindir}/clang-check
1118 %attr(755,root,root) %{_bindir}/clang-cl
1119 %attr(755,root,root) %{_bindir}/clang-cpp
1120 %attr(755,root,root) %{_bindir}/clang-doc
1121 %attr(755,root,root) %{_bindir}/clang-format
1122 %attr(755,root,root) %{_bindir}/clang-linker-wrapper
1123 %attr(755,root,root) %{_bindir}/clang-nvlink-wrapper
1124 %attr(755,root,root) %{_bindir}/clang-offload-bundler
1125 %attr(755,root,root) %{_bindir}/clang-offload-packager
1126 %attr(755,root,root) %{_bindir}/clang-offload-wrapper
1127 %attr(755,root,root) %{_bindir}/clang-pseudo
1128 %attr(755,root,root) %{_bindir}/clang-repl
1129 %attr(755,root,root) %{_bindir}/git-clang-format
1130 %dir %{_libdir}/clang
1131 %dir %{_libdir}/clang/%{version}
1132 %{_libdir}/clang/%{version}/include
1133 %if %{with rt}
1134 %ifarch %{x8664} x32 aarch64
1135 %dir %{_libdir}/clang/%{version}/bin
1136 %attr(755,root,root) %{_libdir}/clang/%{version}/bin/hwasan_symbolize
1137 %endif
1138 %ifarch %{ix86} %{x8664} aarch64 armv7hl armv7hnl
1139 %dir %{_libdir}/clang/%{version}/lib
1140 %dir %{_libdir}/clang/%{version}/lib/*-linux*
1141 %dir %{_libdir}/clang/%{version}/share
1142 %endif
1143 %ifarch x32
1144 %if %{with multilib}
1145 %dir %{_libdir}/clang/%{version}/lib
1146 %dir %{_libdir}/clang/%{version}/lib/*-linux*
1147 %dir %{_libdir}/clang/%{version}/share
1148 %endif
1149 %endif
1150 %ifarch %{ix86}
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
1154 %endif
1155 %ifarch %{x8664}
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
1160 %endif
1161 %ifarch aarch64
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
1166 %endif
1167 %ifarch armv7hl armv7hnl
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
1172 %endif
1173 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
1174 %{_libdir}/clang/%{version}/share/asan_ignorelist.txt
1175 %endif
1176 %ifarch %{ix86} %{x8664} mips64 aarch64 armv7hl armv7hnl
1177 %{_libdir}/clang/%{version}/share/cfi_ignorelist.txt
1178 %endif
1179 %ifarch %{x8664} aarch64 mips64
1180 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
1181 %{_libdir}/clang/%{version}/share/msan_ignorelist.txt
1182 %endif
1183 %ifarch %{x8664} aarch64
1184 %{_libdir}/clang/%{version}/share/hwasan_ignorelist.txt
1185 %endif
1186 %ifarch x32
1187 %if %{with multilib}
1188 %{_libdir}/clang/%{version}/share/asan_ignorelist.txt
1189 %{_libdir}/clang/%{version}/share/cfi_ignorelist.txt
1190 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
1191 %{_libdir}/clang/%{version}/share/msan_ignorelist.txt
1192 %{_libdir}/clang/%{version}/share/hwasan_ignorelist.txt
1193 %endif
1194 %endif
1195 %endif
1196 %dir %{_datadir}/clang
1197 %{_datadir}/clang/clang-format-diff.py
1198
1199 %if %{with rt} && %{with multilib}
1200 %ifarch %{x8664} x32
1201 %files -n clang-multilib
1202 %defattr(644,root,root,755)
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
1206 %endif
1207 %ifarch x32
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
1212 %endif
1213 %endif
1214
1215 %files -n clang-libs
1216 %defattr(644,root,root,755)
1217 %attr(755,root,root) %{_libdir}/libclang.so.15
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
1239 %files -n clang-analyzer
1240 %defattr(644,root,root,755)
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
1249 %attr(755,root,root) %{_bindir}/analyze-build
1250 %attr(755,root,root) %{_bindir}/intercept-build
1251 %attr(755,root,root) %{_bindir}/scan-build-py
1252 %attr(755,root,root) %{_bindir}/scan-view
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
1257 %{_prefix}/lib/libear
1258 %{_prefix}/lib/libscanbuild
1259 %{_datadir}/scan-view
1260
1261 %files -n clang-tools-extra
1262 %defattr(644,root,root,755)
1263 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
1264 %attr(755,root,root) %{_bindir}/clang-apply-replacements
1265 %attr(755,root,root) %{_bindir}/clang-change-namespace
1266 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
1267 %attr(755,root,root) %{_bindir}/clang-include-fixer
1268 %attr(755,root,root) %{_bindir}/clang-move
1269 %attr(755,root,root) %{_bindir}/clang-query
1270 %attr(755,root,root) %{_bindir}/clang-refactor
1271 %attr(755,root,root) %{_bindir}/clang-rename
1272 %attr(755,root,root) %{_bindir}/clang-reorder-fields
1273 %attr(755,root,root) %{_bindir}/clang-scan-deps
1274 %attr(755,root,root) %{_bindir}/clang-tidy
1275 %attr(755,root,root) %{_bindir}/clangd
1276 %attr(755,root,root) %{_bindir}/diagtool
1277 %attr(755,root,root) %{_bindir}/find-all-symbols
1278 %attr(755,root,root) %{_bindir}/hmaptool
1279 %attr(755,root,root) %{_bindir}/modularize
1280 %attr(755,root,root) %{_bindir}/pp-trace
1281 %attr(755,root,root) %{_bindir}/run-clang-tidy
1282 %{_datadir}/clang/clang-include-fixer.py
1283 %{_datadir}/clang/clang-tidy-diff.py
1284 %{_datadir}/clang/run-find-all-symbols.py
1285
1286 %files -n bash-completion-clang
1287 %defattr(644,root,root,755)
1288 %{bash_compdir}/clang
1289
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
1323 %files -n lld
1324 %defattr(644,root,root,755)
1325 %doc tools/lld/{LICENSE.TXT,README.md}
1326 %attr(755,root,root) %{_bindir}/ld.lld
1327 %attr(755,root,root) %{_bindir}/ld64.lld
1328 %attr(755,root,root) %{_bindir}/lld
1329 %attr(755,root,root) %{_bindir}/lld-link
1330 %attr(755,root,root) %{_bindir}/wasm-ld
1331
1332 %files -n lld-devel
1333 %defattr(644,root,root,755)
1334 %{_libdir}/liblld[ACDEHMRWXY]*.a
1335 %{_includedir}/lld
1336 %{_libdir}/cmake/lld
1337
1338 %if %{with lldb}
1339 %files -n lldb
1340 %defattr(644,root,root,755)
1341 %attr(755,root,root) %{_bindir}/lldb
1342 %attr(755,root,root) %{_bindir}/lldb-argdumper
1343 %attr(755,root,root) %{_bindir}/lldb-instr
1344 %attr(755,root,root) %{_bindir}/lldb-server
1345 %attr(755,root,root) %{_bindir}/lldb-vscode
1346 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
1347 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.15
1348 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.15
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
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
1360 %attr(755,root,root) %{py3_sitedir}/lldb/_lldb.cpython-*.so
1361
1362 %files -n lldb-devel
1363 %defattr(644,root,root,755)
1364 %attr(755,root,root) %{_libdir}/liblldb.so
1365 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
1366 %{_includedir}/lldb
1367 %endif
1368
1369 %if %{with ocaml}
1370 %files ocaml
1371 %defattr(644,root,root,755)
1372 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
1373 %dir %{_libdir}/ocaml/llvm
1374 %{_libdir}/ocaml/llvm/llvm*.cma
1375 %{_libdir}/ocaml/llvm/llvm*.cmi
1376 %{_libdir}/ocaml/META.llvm*
1377
1378 %files ocaml-devel
1379 %defattr(644,root,root,755)
1380 %{_libdir}/ocaml/llvm/libllvm*.a
1381 %{_libdir}/ocaml/llvm/llvm*.a
1382 %{_libdir}/ocaml/llvm/llvm*.cmt
1383 %{_libdir}/ocaml/llvm/llvm*.cmti
1384 %{_libdir}/ocaml/llvm/llvm*.cmx
1385 %{_libdir}/ocaml/llvm/llvm*.cmxa
1386 %{_libdir}/ocaml/llvm/llvm*.mli
1387
1388 %files ocaml-doc
1389 %defattr(644,root,root,755)
1390 %doc ocamldocs/*
1391 %endif
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
This page took 0.472559 seconds and 3 git commands to generate.