3 # - normal build (x86_64) requires about 80 GB of disk space
7 # %{_datadir}/clang/bash-autocomplete.sh
8 # %{_datadir}/clang/clang-format-sublime.py - sublime plugin
9 # %{_datadir}/clang/clang-format.el - clang tools emacs integration
10 # %{_datadir}/clang/clang-include-fixer.el
11 # %{_datadir}/clang/clang-rename.el
12 # - no content in doc package (it used to contain parts of clang apidocs and some examples)
13 # - system isl in polly?
16 %bcond_without lldb # LLDB debugger
17 %bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization
18 %bcond_without rt # compiler-rt libraries
19 %bcond_without multilib # compiler-rt multilib libraries
20 %bcond_without ocaml # OCaml binding
21 %bcond_without z3 # Z3 constraint solver support in Clang Static Analyzer
22 %bcond_without doc # HTML docs and man pages
23 %bcond_with cxxmodules # C++20 modules (requires support in bootstrap compiler)
24 %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default)
25 %bcond_with tests # run tests
27 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
28 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
32 %ifarch armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl
36 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
37 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
41 License: University of Illinois/NCSA Open Source License
42 Group: Development/Languages
43 #Source0Download: https://github.com/llvm/llvm-project/releases/
44 Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
45 # Source0-md5: 85844102335b2e01b3c64b6734fb56f2
46 Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
47 # Source1-md5: d8fbc5b1d27f44922cfbbf199d0bab78
48 Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
49 # Source2-md5: 182511f9ba2c83b9d3c934501d48bee9
50 Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
51 # Source3-md5: f36e38d039721555cd41e8687d577094
52 Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
53 # Source4-md5: 314d2db9d05ff6bf006ce3496de47b53
54 Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
55 # Source5-md5: 8f7c4942b26c91de2b90dc85e38590d1
56 Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
57 # Source6-md5: b2f9f55fd275a384f0dfbbc41242d52e
58 Patch1: %{name}-pld.patch
59 Patch2: %{name}-python-modules.patch
60 Patch3: x32-gcc-toolchain.patch
61 Patch4: cmake-buildtype.patch
62 Patch5: %{name}-ocaml-shared.patch
66 BuildRequires: cmake >= 3.4.3
68 BuildRequires: gcc >= 5:3.4
69 # gcc4 might be installed, but not current __cc
70 %if %(rpmvercmp %{cc_version} 3.4 > /dev/null; test $? = 2 && echo 1 || echo 0)
71 BuildRequires: __cc >= 3.4
74 BuildRequires: libedit-devel
75 BuildRequires: libltdl-devel
76 BuildRequires: libpfm-devel
77 BuildRequires: libstdc++-devel >= 5:3.4
78 BuildRequires: libxml2-devel >= 2
79 BuildRequires: ncurses-devel
81 BuildRequires: ocaml >= 4.00.0
82 BuildRequires: ocaml-ctypes-devel >= 0.4
83 BuildRequires: ocaml-findlib
84 BuildRequires: ocaml-ocamldoc
85 BuildRequires: ocaml-ounit >= 2
87 BuildRequires: perl-base >= 1:5.6
88 BuildRequires: perl-tools-pod
89 BuildRequires: python >= 1:2.7
90 BuildRequires: python-PyYAML
91 BuildRequires: python-pygments >= 2.0
92 BuildRequires: rpm-pythonprov
93 BuildRequires: rpmbuild(macros) >= 1.734
94 %{?with_doc:BuildRequires: sphinx-pdg}
95 BuildRequires: tar >= 1:1.22
97 %{?with_z3:BuildRequires: z3-devel >= 4.7.1}
98 BuildRequires: zlib-devel
100 BuildRequires: doxygen
101 BuildRequires: graphviz
104 BuildRequires: dejagnu
105 BuildRequires: tcl-devel
107 %if %{with rt} && %{with multilib}
109 BuildRequires: gcc-c++-multilib-32
110 BuildRequires: libstdc++-multilib-32-devel
113 BuildRequires: gcc-c++-multilib-32
114 BuildRequires: gcc-c++-multilib-64
115 BuildRequires: glibc-devel(x86_64)
116 BuildRequires: libstdc++-multilib-32-devel
117 BuildRequires: libstdc++-multilib-64-devel
121 BuildRequires: epydoc
122 %ifarch i386 i486 %{arm}
123 BuildRequires: libatomic-devel
125 BuildRequires: libxml2-devel >= 2
126 BuildRequires: ncurses-ext-devel
127 BuildRequires: python-devel >= 1:2.7
128 %{?with_doc:BuildRequires: python3-recommonmark}
129 BuildRequires: swig-python >= 3.0.11
132 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
133 # private copy in polly/lib/External/isl
134 #BuildRequires: isl-devel >= 0.18
135 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
138 BuildConflicts: llvm-ocaml
140 Requires: %{name}-libs = %{version}-%{release}
141 # LLVM is not supported on PPC64
142 # http://llvm.org/bugs/show_bug.cgi?id=3729
144 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
147 %define _sysconfdir /etc/%{name}
149 %define specflags_ppc -fno-var-tracking-assignments
151 # objcopy: BFD (GNU Binutils) 2.32 assertion fail format.c:459
152 # objcopy: error: .../libLLVM-8.so(.debug_gnu_pubtypes) is too large (0x1ceee347 bytes)
153 # objcopy: .../libLLVM-8.so[.debug_gnu_pubtypes]: memory exhausted
155 %define _enable_debug_packages 0
157 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
158 # use -gsplit-dwarf only when building packages with debuginfo
159 # to avoid excessive disk space usage
160 %if 0%{?_enable_debug_packages}
161 %define specflags -gsplit-dwarf
164 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
165 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
167 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
168 # -Werror=format-security is for swig
169 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
170 %define filterout_c -fvar-tracking-assignments
171 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
172 %define filterout_ccpp -fvar-tracking-assignments
175 LLVM is a compiler infrastructure designed for compile-time,
176 link-time, runtime, and idle-time optimization of programs from
177 arbitrary programming languages. LLVM is written in C++ and has been
178 developed since 2000 at the University of Illinois and Apple. It
179 currently supports compilation of C and C++ programs using clang
182 %description -l pl.UTF-8
183 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
184 czasu kompilowania, linkowania, działania i bezczynności programów w
185 dowolnych językach programowania. Jest napisana w C++, rozwijana od
186 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
187 kompilację programów w C i C++ przy użyciu frontendu clang.
190 Summary: LLVM shared libraries
191 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
193 Conflicts: llvm < 3.2
196 LLVM shared libraries.
198 %description libs -l pl.UTF-8
199 Biblioteki współdzielone LLVM-a.
202 Summary: Static libraries and header files for LLVM
203 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
204 Group: Development/Languages
205 Requires: %{name}-libs = %{version}-%{release}
206 Requires: libstdc++-devel >= 6:3.4
209 This package contains static libraries and header files needed to
210 develop new native programs that use the LLVM infrastructure.
212 %description devel -l pl.UTF-8
213 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
214 potrzebne do tworzenia nowych programów natywnych wykorzystujących
218 Summary: Documentation for LLVM
219 Summary(pl.UTF-8): Dokumentacja do LLVM-a
221 # does not require base
224 Documentation for the LLVM compiler infrastructure.
226 %description doc -l pl.UTF-8
227 Dokumentacja do infrastruktury kompilatorów LLVM.
230 Summary: API documentation for LLVM
231 Summary(pl.UTF-8): Dokumentacja API LLVM-a
232 Group: Development/Languages
233 Requires: %{name}-doc = %{version}-%{release}
236 API documentation for the LLVM compiler infrastructure.
238 %description apidocs -l pl.UTF-8
239 Dokumentacja API infrastruktury kompilatorów LLVM.
242 Summary: Polyhedral optimizations for LLVM
243 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
244 Group: Development/Tools
245 URL: http://polly.llvm.org/
246 Requires: %{name} = %{version}-%{release}
249 Polly is a high-level loop and data-locality optimizer and
250 optimization infrastructure for LLVM. It uses an abstract mathematical
251 representation based on integer polyhedra to analyze and optimize the
252 memory access pattern of a program.
254 %description polly -l pl.UTF-8
255 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
256 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
257 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
258 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
261 Summary: Header files for LLVM Polly optimization infrastructure
262 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
263 Group: Development/Libraries
264 URL: http://polly.llvm.org/
265 Requires: %{name}-devel = %{version}-%{release}
266 Requires: %{name}-polly = %{version}-%{release}
268 %description polly-devel
269 Header files for LLVM Polly optimization infrastructure.
271 %description polly-devel -l pl.UTF-8
272 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
275 Summary: A C language family frontend for LLVM
276 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
278 Group: Development/Languages
279 Requires: %{name} = %{version}-%{release}
280 Requires: clang-libs = %{version}-%{release}
282 %description -n clang
283 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
284 of a crane or goose. 3. C-language family front-end toolkit.
286 The goal of the Clang project is to create a new C, C++, Objective C
287 and Objective C++ front-end for the LLVM compiler. Its tools are built
288 as libraries and designed to be loosely-coupled and extendable.
290 %description -n clang -l pl.UTF-8
291 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
292 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
295 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
296 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
297 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
300 %package -n clang-libs
301 Summary: Clang shared libraries
302 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
305 %description -n clang-libs
306 Clang shared libraries.
308 %description -n clang-libs -l pl.UTF-8
309 Biblioteki współdzielone Clanga.
311 %package -n clang-multilib
312 Summary: A C language family frontend for LLVM - 32-bit support
313 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
315 Group: Development/Languages
316 Requires: clang = %{version}-%{release}
318 %description -n clang-multilib
319 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
320 of a crane or goose. 3. C-language family front-end toolkit.
322 The goal of the Clang project is to create a new C, C++, Objective C
323 and Objective C++ front-end for the LLVM compiler. Its tools are built
324 as libraries and designed to be loosely-coupled and extendable.
326 This package contains the C compiler support for producing 32-bit
327 programs on 64-bit host.
329 %description -n clang-multilib -l pl.UTF-8
330 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
331 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
334 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
335 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
336 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
339 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
340 programów 32-bitowych na maszynie 64-bitowej.
342 %package -n clang-analyzer
343 Summary: A source code analysis framework
344 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
346 Group: Development/Languages
347 Requires: clang = %{version}-%{release}
348 # not picked up automatically since files are currently not instaled
349 # in standard Python hierarchies yet
352 %description -n clang-analyzer
353 The Clang Static Analyzer consists of both a source code analysis
354 framework and a standalone tool that finds bugs in C and Objective-C
355 programs. The standalone tool is invoked from the command-line, and is
356 intended to run in tandem with a build of a project or code base.
358 %description -n clang-analyzer -l pl.UTF-8
359 Clang Static Analyzer składa się ze szkieletu do analizy kodu
360 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
361 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
362 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
364 %package -n clang-devel
365 Summary: Header files for Clang
366 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
367 Group: Development/Languages
368 Requires: %{name}-devel = %{version}-%{release}
369 Requires: clang = %{version}-%{release}
370 %{?with_polly:Requires: llvm-polly-devel = %{version}-%{release}}
372 %description -n clang-devel
373 This package contains header files for the Clang compiler.
375 %description -n clang-devel -l pl.UTF-8
376 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
378 %package -n clang-doc
379 Summary: Documentation for Clang
380 Summary(pl.UTF-8): Dokumentacja do Clanga
382 Requires: %{name} = %{version}-%{release}
384 %description -n clang-doc
385 Documentation for the Clang compiler front-end.
387 %description -n clang-doc -l pl.UTF-8
388 Dokumentacja do frontendu kompilatora Clang.
390 %package -n clang-apidocs
391 Summary: API documentation for Clang
392 Summary(pl.UTF-8): Dokumentacja API Clanga
393 Group: Development/Languages
394 Requires: clang-doc = %{version}-%{release}
396 %description -n clang-apidocs
397 API documentation for the Clang compiler.
399 %description -n clang-apidocs -l pl.UTF-8
400 Dokumentacja API kompilatora Clang.
402 %package -n clang-tools-extra
403 Summary: Extra tools for Clang
404 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
405 Group: Development/Tools
406 URL: http://clang.llvm.org/docs/ClangTools.html
407 Requires: clang = %{version}-%{release}
409 %description -n clang-tools-extra
410 Extra tools for Clang.
412 %description -n clang-tools-extra -l pl.UTF-8
413 Dodatkowe narzędzia do kompilatora Clang.
416 Summary: The LLVM linker
417 Summary(pl.UTF-8): Konsolidator z projektu LLVM
418 Group: Development/Libraries
419 URL: http://lld.llvm.org/
420 Requires: %{name} = %{version}-%{release}
423 lld is a new set of modular code for creating linker tools.
425 %description -n lld -l pl.UTF-8
426 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
429 %package -n lld-devel
430 Summary: Development files for LLD linker tools
431 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
432 Group: Development/Tools
433 URL: http://lld.llvm.org/
434 Requires: %{name}-devel = %{version}-%{release}
436 %description -n lld-devel
437 Development files for LLD linker tools.
439 %description -n lld-devel -l pl.UTF-8
440 Pliki programistyczne narzędzi konsolidujących LLD.
443 Summary: Next generation high-performance debugger
444 Summary(pl.UTF-8): Wydajny debugger nowej generacji
445 Group: Development/Debuggers
446 URL: http://lldb.llvm.org/
447 Requires: %{name} = %{version}-%{release}
451 LLDB is a next generation, high-performance debugger. It is built as a
452 set of reusable components which highly leverage existing libraries in
453 the larger LLVM Project, such as the Clang expression parser and LLVM
456 %description -n lldb -l pl.UTF-8
457 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
458 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
459 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
462 %package -n lldb-devel
463 Summary: Development files for LLDB debugger
464 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
465 Group: Development/Libraries
466 URL: http://lldb.llvm.org/
467 Requires: %{name}-devel = %{version}-%{release}
468 Requires: clang-devel = %{version}-%{release}
469 Requires: lldb = %{version}-%{release}
471 %description -n lldb-devel
472 Development files for LLDB debugger.
474 %description -n lldb-devel -l pl.UTF-8
475 Pliki programistyczne debuggera LLDB.
478 Summary: OCaml binding for LLVM
479 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
481 Requires: %{name} = %{version}-%{release}
483 %requires_eq ocaml-runtime
487 OCaml binding for LLVM.
489 %description ocaml -l pl.UTF-8
490 Wiązanie OCamla do LLVM-a.
493 Summary: Development files for LLVM OCaml binding
494 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
495 Group: Development/Libraries
496 Requires: %{name}-devel = %{version}-%{release}
497 Requires: %{name}-ocaml = %{version}-%{release}
499 %description ocaml-devel
500 The llvm-ocaml-devel package contains libraries and signature files
501 for developing applications that use llvm-ocaml binding.
503 %description ocaml-devel -l pl.UTF-8
504 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
505 wykorzystujących wiązanie llvm-ocaml.
508 Summary: Documentation for LLVM's OCaml binding
509 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
511 Requires: %{name}-ocaml = %{version}-%{release}
513 %description ocaml-doc
514 HTML documentation for LLVM's OCaml binding.
516 %description ocaml-doc -l pl.UTF-8
517 Dokumentacja HTML wiązania OCamla do LLVM-a.
520 Summary: Optimization records visualization tools
521 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
522 Group: Development/Tools
523 Requires: %{name} = %{version}
526 %description opt-viewer
527 Optimization records visualization tools.
529 %description opt-viewer -l pl.UTF-8
530 Narzędzia do wizualizacji rekordów optymalizacji.
532 %package -n vim-plugin-clang
533 Summary: Clang format and rename integration for Vim
534 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
535 Group: Applications/Editors/Vim
536 Requires: vim-rt >= 4:7.0
539 %description -n vim-plugin-clang
540 Clang format and rename integration for Vim.
542 %description -n vim-plugin-clang -l pl.UTF-8
543 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
546 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
547 %{__mv} clang-%{version}.src tools/clang
548 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
549 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
550 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
551 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
552 %{__mv} lld-%{version}.src tools/lld
560 grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{
561 s,^#!.*bin/env python,#!%{__python},
562 s,^#!.*bin/env perl,#!%{__perl},
565 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
566 s,^#!.*bin/python.*,#!%{__python},
572 # Disabling assertions now, rec. by pure and needed for OpenGTL
573 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
575 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
578 -DBUILD_SHARED_LIBS:BOOL=OFF \
579 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
580 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
581 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
582 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
583 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
584 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
586 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
588 %{?with_cxxmodules:-DLLVM_ENABLE_MODULES:BOOL=ON} \
589 -DLLVM_ENABLE_PIC:BOOL=ON \
590 -DLLVM_ENABLE_RTTI:BOOL=ON \
592 -DLLVM_ENABLE_SPHINX:BOOL=ON \
594 %{!?with_z3:-DLLVM_ENABLE_Z3_SOLVER:BOOL=OFF} \
595 %if "%{_lib}" == "lib64"
596 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
598 %if "%{_lib}" == "libx32"
599 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
601 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
602 -DLLVM_DEFAULT_TARGET_TRIPLE:STRING=%{_target_platform} \
603 -DSPHINX_WARNINGS_AS_ERRORS=OFF
607 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
610 %{__make} check 2>&1 | tee llvm-testlog.txt
611 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
615 %{__make} -C docs docs-llvm-html
616 %{__make} -C docs docs-llvm-man
618 %{__make} -C docs ocaml_doc
620 %{__make} -C tools/clang/docs docs-clang-html
621 %{__make} -C tools/clang/docs docs-clang-man
622 %{__make} -C tools/lld/docs docs-lld-html
623 # workaround failed import of _lldb
624 cp -pnL %{_lib}/python%{py_ver}/site-packages/lldb/_lldb.so tools/lldb/docs/lldb
626 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
627 -C tools/lldb/docs lldb-python-doc
628 %{__make} -C tools/lldb/docs lldb-cpp-doc
632 rm -rf $RPM_BUILD_ROOT
634 %{__make} -j1 -C build install \
635 DESTDIR=$RPM_BUILD_ROOT
637 # only some .pyc files are created by make install
638 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
639 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
641 # Adjust static analyzer installation
642 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
643 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
644 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
645 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
646 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
647 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
648 %py_postclean %{_datadir}/scan-view
650 # not installed by cmake buildsystem
651 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
654 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
655 # these tools are not installed
656 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
658 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
661 # Move documentation back to build directory
664 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
667 # and separate the apidoc
670 cp -a build/tools/clang/docs/html clang-apidoc
673 # And prepare Clang documentation
675 install -d clang-docs
676 for f in LICENSE.TXT NOTES.txt README.txt; do
677 ln tools/clang/$f clang-docs
680 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
682 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
684 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
685 # it seems it is used internally by an extra clang tool
686 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
688 # disable completeness check incompatible with split packaging
689 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
692 rm -rf $RPM_BUILD_ROOT
694 %post libs -p /sbin/ldconfig
695 %postun libs -p /sbin/ldconfig
697 %post -n clang-libs -p /sbin/ldconfig
698 %postun -n clang-libs -p /sbin/ldconfig
700 %post -n lldb -p /sbin/ldconfig
701 %postun -n lldb -p /sbin/ldconfig
704 %defattr(644,root,root,755)
705 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
706 %attr(755,root,root) %{_bindir}/bugpoint
707 %attr(755,root,root) %{_bindir}/dsymutil
708 %attr(755,root,root) %{_bindir}/llc
709 %attr(755,root,root) %{_bindir}/lli
710 %attr(755,root,root) %{_bindir}/llvm-addr2line
711 %attr(755,root,root) %{_bindir}/llvm-ar
712 %attr(755,root,root) %{_bindir}/llvm-as
713 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
714 %attr(755,root,root) %{_bindir}/llvm-cat
715 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
716 %attr(755,root,root) %{_bindir}/llvm-cov
717 %attr(755,root,root) %{_bindir}/llvm-cvtres
718 %attr(755,root,root) %{_bindir}/llvm-cxxdump
719 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
720 %attr(755,root,root) %{_bindir}/llvm-cxxmap
721 %attr(755,root,root) %{_bindir}/llvm-diff
722 %attr(755,root,root) %{_bindir}/llvm-dis
723 %attr(755,root,root) %{_bindir}/llvm-dlltool
724 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
725 %attr(755,root,root) %{_bindir}/llvm-dwp
726 %attr(755,root,root) %{_bindir}/llvm-elfabi
727 %attr(755,root,root) %{_bindir}/llvm-exegesis
728 %attr(755,root,root) %{_bindir}/llvm-extract
729 %attr(755,root,root) %{_bindir}/llvm-gsymutil
730 %attr(755,root,root) %{_bindir}/llvm-ifs
731 %attr(755,root,root) %{_bindir}/llvm-install-name-tool
732 %attr(755,root,root) %{_bindir}/llvm-jitlink
733 %attr(755,root,root) %{_bindir}/llvm-lib
734 %attr(755,root,root) %{_bindir}/llvm-link
735 %attr(755,root,root) %{_bindir}/llvm-lipo
736 %attr(755,root,root) %{_bindir}/llvm-lto
737 %attr(755,root,root) %{_bindir}/llvm-lto2
738 %attr(755,root,root) %{_bindir}/llvm-mc
739 %attr(755,root,root) %{_bindir}/llvm-mca
740 %attr(755,root,root) %{_bindir}/llvm-ml
741 %attr(755,root,root) %{_bindir}/llvm-modextract
742 %attr(755,root,root) %{_bindir}/llvm-mt
743 %attr(755,root,root) %{_bindir}/llvm-nm
744 %attr(755,root,root) %{_bindir}/llvm-objcopy
745 %attr(755,root,root) %{_bindir}/llvm-objdump
746 %attr(755,root,root) %{_bindir}/llvm-opt-report
747 %attr(755,root,root) %{_bindir}/llvm-pdbutil
748 %attr(755,root,root) %{_bindir}/llvm-profdata
749 %attr(755,root,root) %{_bindir}/llvm-ranlib
750 %attr(755,root,root) %{_bindir}/llvm-rc
751 %attr(755,root,root) %{_bindir}/llvm-readelf
752 %attr(755,root,root) %{_bindir}/llvm-readobj
753 %attr(755,root,root) %{_bindir}/llvm-reduce
754 %attr(755,root,root) %{_bindir}/llvm-rtdyld
755 %attr(755,root,root) %{_bindir}/llvm-size
756 %attr(755,root,root) %{_bindir}/llvm-split
757 %attr(755,root,root) %{_bindir}/llvm-strip
758 %attr(755,root,root) %{_bindir}/llvm-stress
759 %attr(755,root,root) %{_bindir}/llvm-strings
760 %attr(755,root,root) %{_bindir}/llvm-symbolizer
761 %attr(755,root,root) %{_bindir}/llvm-tblgen
762 %attr(755,root,root) %{_bindir}/llvm-undname
763 %attr(755,root,root) %{_bindir}/llvm-xray
764 %attr(755,root,root) %{_bindir}/obj2yaml
765 %attr(755,root,root) %{_bindir}/opt
766 %attr(755,root,root) %{_bindir}/sancov
767 %attr(755,root,root) %{_bindir}/sanstats
768 %attr(755,root,root) %{_bindir}/verify-uselistorder
769 %attr(755,root,root) %{_bindir}/yaml2obj
771 %{_mandir}/man1/bugpoint.1*
772 %{_mandir}/man1/dsymutil.1*
773 %{_mandir}/man1/lit.1*
774 %{_mandir}/man1/llc.1*
775 %{_mandir}/man1/lli.1*
776 %{_mandir}/man1/llvm-addr2line.1*
777 %{_mandir}/man1/llvm-ar.1*
778 %{_mandir}/man1/llvm-as.1*
779 %{_mandir}/man1/llvm-bcanalyzer.1*
780 %{_mandir}/man1/llvm-cov.1*
781 %{_mandir}/man1/llvm-cxxfilt.1*
782 %{_mandir}/man1/llvm-cxxmap.1*
783 %{_mandir}/man1/llvm-diff.1*
784 %{_mandir}/man1/llvm-dis.1*
785 %{_mandir}/man1/llvm-dwarfdump.1*
786 %{_mandir}/man1/llvm-exegesis.1*
787 %{_mandir}/man1/llvm-extract.1*
788 %{_mandir}/man1/llvm-lib.1*
789 %{_mandir}/man1/llvm-link.1*
790 %{_mandir}/man1/llvm-lipo.1*
791 %{_mandir}/man1/llvm-locstats.1*
792 %{_mandir}/man1/llvm-mca.1*
793 %{_mandir}/man1/llvm-nm.1*
794 %{_mandir}/man1/llvm-objcopy.1*
795 %{_mandir}/man1/llvm-objdump.1*
796 %{_mandir}/man1/llvm-pdbutil.1*
797 %{_mandir}/man1/llvm-profdata.1*
798 %{_mandir}/man1/llvm-ranlib.1*
799 %{_mandir}/man1/llvm-readelf.1*
800 %{_mandir}/man1/llvm-readobj.1*
801 %{_mandir}/man1/llvm-size.1*
802 %{_mandir}/man1/llvm-stress.1*
803 %{_mandir}/man1/llvm-strings.1*
804 %{_mandir}/man1/llvm-strip.1*
805 %{_mandir}/man1/llvm-symbolizer.1*
806 %{_mandir}/man1/opt.1*
807 %{_mandir}/man1/tblgen.1*
811 %defattr(644,root,root,755)
812 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
814 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
815 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.11
816 %attr(755,root,root) %{_libdir}/LLVMgold.so
817 %attr(755,root,root) %{_libdir}/libRemarks.so.11
818 %attr(755,root,root) %{_libdir}/libclang-cpp.so.11
821 %defattr(644,root,root,755)
822 %attr(755,root,root) %{_bindir}/llvm-config
823 %attr(755,root,root) %{_libdir}/libLLVM.so
824 %attr(755,root,root) %{_libdir}/libLTO.so
825 %attr(755,root,root) %{_libdir}/libRemarks.so
826 %attr(755,root,root) %{_libdir}/libclang-cpp.so
827 %{_libdir}/libLLVM*.a
829 %{_includedir}/llvm-c
830 %{_libdir}/cmake/llvm
832 %{_mandir}/man1/llvm-config.1*
836 #%defattr(644,root,root,755)
840 %defattr(644,root,root,755)
846 %defattr(644,root,root,755)
847 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
848 %attr(755,root,root) %{_libdir}/LLVMPolly.so
851 %defattr(644,root,root,755)
852 %{_libdir}/libPolly.a
853 %{_libdir}/libPollyISL.a
854 %{_libdir}/libPollyPPCG.a
856 %{_libdir}/cmake/polly
860 %defattr(644,root,root,755)
861 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
862 %attr(755,root,root) %{_bindir}/clang
863 %attr(755,root,root) %{_bindir}/clang++
864 %attr(755,root,root) %{_bindir}/clang-%{abi}
865 %attr(755,root,root) %{_bindir}/clang-check
866 %attr(755,root,root) %{_bindir}/clang-cl
867 %attr(755,root,root) %{_bindir}/clang-cpp
868 %attr(755,root,root) %{_bindir}/clang-doc
869 %attr(755,root,root) %{_bindir}/clang-format
870 %attr(755,root,root) %{_bindir}/clang-offload-bundler
871 %attr(755,root,root) %{_bindir}/clang-offload-wrapper
872 %attr(755,root,root) %{_bindir}/git-clang-format
873 %dir %{_libdir}/clang
874 %dir %{_libdir}/clang/%{version}
875 %{_libdir}/clang/%{version}/include
877 %ifarch %{x8664} aarch64
878 %dir %{_libdir}/clang/%{version}/bin
879 %attr(755,root,root) %{_libdir}/clang/%{version}/bin/hwasan_symbolize
881 %ifarch %{ix86} %{x8664} aarch64
882 %dir %{_libdir}/clang/%{version}/lib
883 %dir %{_libdir}/clang/%{version}/lib/linux
884 %dir %{_libdir}/clang/%{version}/share
888 %dir %{_libdir}/clang/%{version}/lib
889 %dir %{_libdir}/clang/%{version}/lib/linux
890 %dir %{_libdir}/clang/%{version}/share
894 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i*86.o
895 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
896 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
899 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
900 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
901 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
902 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
905 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-aarch64.o
906 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.a
907 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.so
908 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.a.syms
910 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
911 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
913 %ifarch %{ix86} %{x8664} mips64 aarch64
914 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
916 %ifarch %{x8664} aarch64 mips64
917 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
918 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
920 %ifarch %{x8664} aarch64
921 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
925 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
926 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
927 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
928 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
929 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
933 %dir %{_datadir}/clang
934 %{_datadir}/clang/clang-format-diff.py
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
940 %if %{with rt} && %{with multilib}
942 %files -n clang-multilib
943 %defattr(644,root,root,755)
944 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i386.o
945 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
946 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
949 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
950 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
951 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
952 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
956 %files -n clang-analyzer
957 %defattr(644,root,root,755)
958 %attr(755,root,root) %{_bindir}/scan-build
959 %attr(755,root,root) %{_bindir}/scan-view
960 %{_datadir}/scan-build
961 %{_datadir}/scan-view
962 %{_mandir}/man1/scan-build.1*
963 %dir %{_libdir}/scan-build
964 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
965 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
967 %files -n clang-devel
968 %defattr(644,root,root,755)
969 %attr(755,root,root) %{_libdir}/libclang.so
970 %{_libdir}/libclang*.a
972 %{_includedir}/clang-c
973 %{_includedir}/clang-tidy
974 %{_libdir}/cmake/clang
977 %defattr(644,root,root,755)
978 %doc tools/clang/docs/*.{html,png,txt}
981 %files -n clang-apidocs
982 %defattr(644,root,root,755)
986 %files -n clang-tools-extra
987 %defattr(644,root,root,755)
988 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
989 %attr(755,root,root) %{_bindir}/clang-apply-replacements
990 %attr(755,root,root) %{_bindir}/clang-change-namespace
991 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
992 %attr(755,root,root) %{_bindir}/clang-include-fixer
993 %attr(755,root,root) %{_bindir}/clang-move
994 %attr(755,root,root) %{_bindir}/clang-query
995 %attr(755,root,root) %{_bindir}/clang-refactor
996 %attr(755,root,root) %{_bindir}/clang-rename
997 %attr(755,root,root) %{_bindir}/clang-reorder-fields
998 %attr(755,root,root) %{_bindir}/clang-scan-deps
999 %attr(755,root,root) %{_bindir}/clang-tidy
1000 %attr(755,root,root) %{_bindir}/clangd
1001 %attr(755,root,root) %{_bindir}/diagtool
1002 %attr(755,root,root) %{_bindir}/find-all-symbols
1003 %attr(755,root,root) %{_bindir}/hmaptool
1004 %attr(755,root,root) %{_bindir}/modularize
1005 %attr(755,root,root) %{_bindir}/pp-trace
1006 %{_datadir}/clang/clang-include-fixer.py
1007 %{_datadir}/clang/clang-tidy-diff.py
1008 %{_datadir}/clang/run-clang-tidy.py
1009 %{_datadir}/clang/run-find-all-symbols.py
1012 %defattr(644,root,root,755)
1013 %doc tools/lld/{LICENSE.TXT,README.md}
1014 %attr(755,root,root) %{_bindir}/ld.lld
1015 %attr(755,root,root) %{_bindir}/ld64.lld
1016 %attr(755,root,root) %{_bindir}/lld
1017 %attr(755,root,root) %{_bindir}/lld-link
1018 %attr(755,root,root) %{_bindir}/wasm-ld
1021 %defattr(644,root,root,755)
1022 %{_libdir}/liblld[ACDEHMRWXY]*.a
1024 %{_libdir}/cmake/lld
1028 %defattr(644,root,root,755)
1029 %attr(755,root,root) %{_bindir}/lldb
1030 %attr(755,root,root) %{_bindir}/lldb-argdumper
1031 %attr(755,root,root) %{_bindir}/lldb-instr
1032 %attr(755,root,root) %{_bindir}/lldb-server
1033 %attr(755,root,root) %{_bindir}/lldb-vscode
1034 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
1035 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.11
1036 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.11
1037 %dir %{py_sitedir}/lldb
1038 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
1039 %{py_sitedir}/lldb/formatters
1040 %{py_sitedir}/lldb/utils
1041 %{py_sitedir}/lldb/__init__.py[co]
1042 %{py_sitedir}/lldb/embedded_interpreter.py[co]
1043 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
1045 %files -n lldb-devel
1046 %defattr(644,root,root,755)
1047 %attr(755,root,root) %{_libdir}/liblldb.so
1048 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
1054 %defattr(644,root,root,755)
1055 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
1056 %dir %{_libdir}/ocaml/llvm
1057 %{_libdir}/ocaml/llvm/llvm*.cma
1058 %{_libdir}/ocaml/llvm/llvm*.cmi
1059 %{_libdir}/ocaml/META.llvm*
1062 %defattr(644,root,root,755)
1063 %{_libdir}/ocaml/llvm/libllvm*.a
1064 %{_libdir}/ocaml/llvm/llvm*.a
1065 %{_libdir}/ocaml/llvm/llvm*.cmx
1066 %{_libdir}/ocaml/llvm/llvm*.cmxa
1067 %{_libdir}/ocaml/llvm/llvm*.mli
1070 %defattr(644,root,root,755)
1075 %defattr(644,root,root,755)
1076 %{_datadir}/opt-viewer
1078 %files -n vim-plugin-clang
1079 %defattr(644,root,root,755)
1080 %{_datadir}/clang/clang-format.py
1081 %{_datadir}/clang/clang-rename.py