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