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