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