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 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
33 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
37 License: University of Illinois/NCSA Open Source License
38 Group: Development/Languages
39 #Source0Download: https://github.com/llvm/llvm-project/releases/
40 Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz
41 # Source0-md5: 693cefdc49d618f828144486a18b473f
42 Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-%{version}.src.tar.xz
43 # Source1-md5: 717ef92318fed4dbe1ee058368cfb552
44 Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
45 # Source2-md5: 3a8477233f69600f3e2ca997405c29db
46 Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
47 # Source3-md5: 9828da982f3088cece20e0db9e76e06d
48 Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
49 # Source4-md5: f71e6f808676c211338ad10b3ad5c10d
50 Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
51 # Source5-md5: 19adb2918e88d682ba2f97ac7280a25d
52 Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
53 # Source6-md5: 481ab4e01c8c5549c8aff5ef1bd25425
54 Patch1: %{name}-pld.patch
55 Patch2: %{name}-python-modules.patch
56 Patch3: x32-gcc-toolchain.patch
57 Patch4: cmake-buildtype.patch
58 Patch5: %{name}-ocaml-shared.patch
59 Patch6: lld-sphinx2.patch
63 BuildRequires: cmake >= 3.4.3
65 BuildRequires: gcc >= 5:3.4
66 # gcc4 might be installed, but not current __cc
67 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
68 BuildRequires: __cc >= 3.4
71 BuildRequires: libedit-devel
72 BuildRequires: libltdl-devel
73 BuildRequires: libpfm-devel
74 BuildRequires: libstdc++-devel >= 5:3.4
75 BuildRequires: libxml2-devel >= 2
76 BuildRequires: ncurses-devel
78 BuildRequires: ocaml >= 4.00.0
79 BuildRequires: ocaml-ctypes-devel >= 0.4
80 BuildRequires: ocaml-findlib
81 BuildRequires: ocaml-ocamldoc
82 BuildRequires: ocaml-ounit >= 2
84 BuildRequires: perl-base >= 1:5.6
85 BuildRequires: perl-tools-pod
86 BuildRequires: python >= 1:2.7
87 BuildRequires: python-PyYAML
88 BuildRequires: python-pygments >= 2.0
89 BuildRequires: rpm-pythonprov
90 BuildRequires: rpmbuild(macros) >= 1.734
91 %{?with_doc:BuildRequires: sphinx-pdg}
92 BuildRequires: tar >= 1:1.22
94 %{?with_z3:BuildRequires: z3-devel >= 4.7.1}
95 BuildRequires: zlib-devel
97 BuildRequires: doxygen
98 BuildRequires: graphviz
101 BuildRequires: dejagnu
102 BuildRequires: tcl-devel
104 %if %{with rt} && %{with multilib}
106 BuildRequires: gcc-c++-multilib-32
107 BuildRequires: libstdc++-multilib-32-devel
110 BuildRequires: gcc-c++-multilib-32
111 BuildRequires: gcc-c++-multilib-64
112 BuildRequires: glibc-devel(x86_64)
113 BuildRequires: libstdc++-multilib-32-devel
114 BuildRequires: libstdc++-multilib-64-devel
118 BuildRequires: epydoc
120 BuildRequires: libatomic-devel
122 BuildRequires: libxml2-devel >= 2
123 BuildRequires: ncurses-ext-devel
124 BuildRequires: python-devel >= 1:2.7
125 %{?with_doc:BuildRequires: python3-recommonmark}
126 BuildRequires: swig-python >= 3.0.11
129 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
130 # private copy in polly/lib/External/isl
131 #BuildRequires: isl-devel >= 0.18
132 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
135 BuildConflicts: llvm-ocaml
137 Requires: %{name}-libs = %{version}-%{release}
138 # LLVM is not supported on PPC64
139 # http://llvm.org/bugs/show_bug.cgi?id=3729
141 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
144 %define _sysconfdir /etc/%{name}
146 %define specflags_ppc -fno-var-tracking-assignments
148 # objcopy: BFD (GNU Binutils) 2.32 assertion fail format.c:459
149 # objcopy: error: .../libLLVM-8.so(.debug_gnu_pubtypes) is too large (0x1ceee347 bytes)
150 # objcopy: .../libLLVM-8.so[.debug_gnu_pubtypes]: memory exhausted
152 %define _enable_debug_packages 0
154 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
155 # use -gsplit-dwarf only when building packages with debuginfo
156 # to avoid excessive disk space usage
157 %if 0%{?_enable_debug_packages}
158 %define specflags -gsplit-dwarf
161 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
162 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
164 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
165 # -Werror=format-security is for swig
166 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
167 %define filterout_c -fvar-tracking-assignments
168 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
169 %define filterout_ccpp -fvar-tracking-assignments
172 LLVM is a compiler infrastructure designed for compile-time,
173 link-time, runtime, and idle-time optimization of programs from
174 arbitrary programming languages. LLVM is written in C++ and has been
175 developed since 2000 at the University of Illinois and Apple. It
176 currently supports compilation of C and C++ programs using clang
179 %description -l pl.UTF-8
180 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
181 czasu kompilowania, linkowania, działania i bezczynności programów w
182 dowolnych językach programowania. Jest napisana w C++, rozwijana od
183 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
184 kompilację programów w C i C++ przy użyciu frontendu clang.
187 Summary: LLVM shared libraries
188 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
190 Conflicts: llvm < 3.2
193 LLVM shared libraries.
195 %description libs -l pl.UTF-8
196 Biblioteki współdzielone LLVM-a.
199 Summary: Static libraries and header files for LLVM
200 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
201 Group: Development/Languages
202 Requires: %{name}-libs = %{version}-%{release}
203 Requires: libstdc++-devel >= 6:3.4
206 This package contains static libraries and header files needed to
207 develop new native programs that use the LLVM infrastructure.
209 %description devel -l pl.UTF-8
210 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
211 potrzebne do tworzenia nowych programów natywnych wykorzystujących
215 Summary: Documentation for LLVM
216 Summary(pl.UTF-8): Dokumentacja do LLVM-a
218 # does not require base
221 Documentation for the LLVM compiler infrastructure.
223 %description doc -l pl.UTF-8
224 Dokumentacja do infrastruktury kompilatorów LLVM.
227 Summary: API documentation for LLVM
228 Summary(pl.UTF-8): Dokumentacja API LLVM-a
229 Group: Development/Languages
230 Requires: %{name}-doc = %{version}-%{release}
233 API documentation for the LLVM compiler infrastructure.
235 %description apidocs -l pl.UTF-8
236 Dokumentacja API infrastruktury kompilatorów LLVM.
239 Summary: Polyhedral optimizations for LLVM
240 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
241 Group: Development/Tools
242 URL: http://polly.llvm.org/
243 Requires: %{name} = %{version}-%{release}
246 Polly is a high-level loop and data-locality optimizer and
247 optimization infrastructure for LLVM. It uses an abstract mathematical
248 representation based on integer polyhedra to analyze and optimize the
249 memory access pattern of a program.
251 %description polly -l pl.UTF-8
252 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
253 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
254 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
255 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
258 Summary: Header files for LLVM Polly optimization infrastructure
259 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
260 Group: Development/Libraries
261 URL: http://polly.llvm.org/
262 Requires: %{name}-devel = %{version}-%{release}
263 Requires: %{name}-polly = %{version}-%{release}
265 %description polly-devel
266 Header files for LLVM Polly optimization infrastructure.
268 %description polly-devel -l pl.UTF-8
269 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
272 Summary: A C language family frontend for LLVM
273 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
275 Group: Development/Languages
276 Requires: %{name} = %{version}-%{release}
277 Requires: clang-libs = %{version}-%{release}
279 %description -n clang
280 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
281 of a crane or goose. 3. C-language family front-end toolkit.
283 The goal of the Clang project is to create a new C, C++, Objective C
284 and Objective C++ front-end for the LLVM compiler. Its tools are built
285 as libraries and designed to be loosely-coupled and extendable.
287 %description -n clang -l pl.UTF-8
288 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
289 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
292 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
293 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
294 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
297 %package -n clang-libs
298 Summary: Clang shared libraries
299 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
302 %description -n clang-libs
303 Clang shared libraries.
305 %description -n clang-libs -l pl.UTF-8
306 Biblioteki współdzielone Clanga.
308 %package -n clang-multilib
309 Summary: A C language family frontend for LLVM - 32-bit support
310 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
312 Group: Development/Languages
313 Requires: clang = %{version}-%{release}
315 %description -n clang-multilib
316 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
317 of a crane or goose. 3. C-language family front-end toolkit.
319 The goal of the Clang project is to create a new C, C++, Objective C
320 and Objective C++ front-end for the LLVM compiler. Its tools are built
321 as libraries and designed to be loosely-coupled and extendable.
323 This package contains the C compiler support for producing 32-bit
324 programs on 64-bit host.
326 %description -n clang-multilib -l pl.UTF-8
327 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
328 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
331 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
332 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
333 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
336 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
337 programów 32-bitowych na maszynie 64-bitowej.
339 %package -n clang-analyzer
340 Summary: A source code analysis framework
341 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
343 Group: Development/Languages
344 Requires: clang = %{version}-%{release}
345 # not picked up automatically since files are currently not instaled
346 # in standard Python hierarchies yet
349 %description -n clang-analyzer
350 The Clang Static Analyzer consists of both a source code analysis
351 framework and a standalone tool that finds bugs in C and Objective-C
352 programs. The standalone tool is invoked from the command-line, and is
353 intended to run in tandem with a build of a project or code base.
355 %description -n clang-analyzer -l pl.UTF-8
356 Clang Static Analyzer składa się ze szkieletu do analizy kodu
357 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
358 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
359 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
361 %package -n clang-devel
362 Summary: Header files for Clang
363 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
364 Group: Development/Languages
365 Requires: %{name}-devel = %{version}-%{release}
366 Requires: clang = %{version}-%{release}
367 %{?with_polly:Requires: llvm-polly-devel = %{version}-%{release}}
369 %description -n clang-devel
370 This package contains header files for the Clang compiler.
372 %description -n clang-devel -l pl.UTF-8
373 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
375 %package -n clang-doc
376 Summary: Documentation for Clang
377 Summary(pl.UTF-8): Dokumentacja do Clanga
379 Requires: %{name} = %{version}-%{release}
381 %description -n clang-doc
382 Documentation for the Clang compiler front-end.
384 %description -n clang-doc -l pl.UTF-8
385 Dokumentacja do frontendu kompilatora Clang.
387 %package -n clang-apidocs
388 Summary: API documentation for Clang
389 Summary(pl.UTF-8): Dokumentacja API Clanga
390 Group: Development/Languages
391 Requires: clang-doc = %{version}-%{release}
393 %description -n clang-apidocs
394 API documentation for the Clang compiler.
396 %description -n clang-apidocs -l pl.UTF-8
397 Dokumentacja API kompilatora Clang.
399 %package -n clang-tools-extra
400 Summary: Extra tools for Clang
401 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
402 Group: Development/Tools
403 URL: http://clang.llvm.org/docs/ClangTools.html
404 Requires: clang = %{version}-%{release}
406 %description -n clang-tools-extra
407 Extra tools for Clang.
409 %description -n clang-tools-extra -l pl.UTF-8
410 Dodatkowe narzędzia do kompilatora Clang.
413 Summary: The LLVM linker
414 Summary(pl.UTF-8): Konsolidator z projektu LLVM
415 Group: Development/Libraries
416 URL: http://lld.llvm.org/
417 Requires: %{name} = %{version}-%{release}
420 lld is a new set of modular code for creating linker tools.
422 %description -n lld -l pl.UTF-8
423 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
426 %package -n lld-devel
427 Summary: Development files for LLD linker tools
428 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
429 Group: Development/Tools
430 URL: http://lld.llvm.org/
431 Requires: %{name}-devel = %{version}-%{release}
433 %description -n lld-devel
434 Development files for LLD linker tools.
436 %description -n lld-devel -l pl.UTF-8
437 Pliki programistyczne narzędzi konsolidujących LLD.
440 Summary: Next generation high-performance debugger
441 Summary(pl.UTF-8): Wydajny debugger nowej generacji
442 Group: Development/Debuggers
443 URL: http://lldb.llvm.org/
444 Requires: %{name} = %{version}-%{release}
448 LLDB is a next generation, high-performance debugger. It is built as a
449 set of reusable components which highly leverage existing libraries in
450 the larger LLVM Project, such as the Clang expression parser and LLVM
453 %description -n lldb -l pl.UTF-8
454 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
455 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
456 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
459 %package -n lldb-devel
460 Summary: Development files for LLDB debugger
461 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
462 Group: Development/Libraries
463 URL: http://lldb.llvm.org/
464 Requires: %{name}-devel = %{version}-%{release}
465 Requires: clang-devel = %{version}-%{release}
466 Requires: lldb = %{version}-%{release}
468 %description -n lldb-devel
469 Development files for LLDB debugger.
471 %description -n lldb-devel -l pl.UTF-8
472 Pliki programistyczne debuggera LLDB.
475 Summary: OCaml binding for LLVM
476 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
478 Requires: %{name} = %{version}-%{release}
480 %requires_eq ocaml-runtime
484 OCaml binding for LLVM.
486 %description ocaml -l pl.UTF-8
487 Wiązanie OCamla do LLVM-a.
490 Summary: Development files for LLVM OCaml binding
491 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
492 Group: Development/Libraries
493 Requires: %{name}-devel = %{version}-%{release}
494 Requires: %{name}-ocaml = %{version}-%{release}
496 %description ocaml-devel
497 The llvm-ocaml-devel package contains libraries and signature files
498 for developing applications that use llvm-ocaml binding.
500 %description ocaml-devel -l pl.UTF-8
501 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
502 wykorzystujących wiązanie llvm-ocaml.
505 Summary: Documentation for LLVM's OCaml binding
506 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
508 Requires: %{name}-ocaml = %{version}-%{release}
510 %description ocaml-doc
511 HTML documentation for LLVM's OCaml binding.
513 %description ocaml-doc -l pl.UTF-8
514 Dokumentacja HTML wiązania OCamla do LLVM-a.
517 Summary: Optimization records visualization tools
518 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
519 Group: Development/Tools
520 Requires: %{name} = %{version}
523 %description opt-viewer
524 Optimization records visualization tools.
526 %description opt-viewer -l pl.UTF-8
527 Narzędzia do wizualizacji rekordów optymalizacji.
529 %package -n vim-plugin-clang
530 Summary: Clang format and rename integration for Vim
531 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
532 Group: Applications/Editors/Vim
533 Requires: vim-rt >= 4:7.0
536 %description -n vim-plugin-clang
537 Clang format and rename integration for Vim.
539 %description -n vim-plugin-clang -l pl.UTF-8
540 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
543 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
544 %{__mv} clang-%{version}.src tools/clang
545 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
546 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
547 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
548 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
549 %{__mv} lld-%{version}.src tools/lld
558 grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{
559 s,^#!.*bin/env python,#!%{__python},
560 s,^#!.*bin/env perl,#!%{__perl},
563 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
564 s,^#!.*bin/python.*,#!%{__python},
570 # Disabling assertions now, rec. by pure and needed for OpenGTL
571 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
573 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
576 -DBUILD_SHARED_LIBS:BOOL=OFF \
577 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
578 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
579 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
580 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
581 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
582 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
584 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
586 %{?with_cxxmodules:-DLLVM_ENABLE_MODULES:BOOL=ON} \
587 -DLLVM_ENABLE_PIC:BOOL=ON \
588 -DLLVM_ENABLE_RTTI:BOOL=ON \
590 -DLLVM_ENABLE_SPHINX:BOOL=ON \
592 %{!?with_z3:-DLLVM_ENABLE_Z3_SOLVER:BOOL=OFF} \
593 %if "%{_lib}" == "lib64"
594 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
596 %if "%{_lib}" == "libx32"
597 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
599 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
600 -DSPHINX_WARNINGS_AS_ERRORS=OFF
604 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
607 %{__make} check 2>&1 | tee llvm-testlog.txt
608 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
612 %{__make} -C docs docs-llvm-html
613 %{__make} -C docs docs-llvm-man
615 %{__make} -C docs ocaml_doc
617 %{__make} -C tools/clang/docs docs-clang-html
618 %{__make} -C tools/clang/docs docs-clang-man
619 %{__make} -C tools/lld/docs docs-lld-html
620 # workaround failed import of _lldb
621 cp -pnL %{_lib}/python%{py_ver}/site-packages/lldb/_lldb.so tools/lldb/docs/lldb
623 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
624 -C tools/lldb/docs lldb-python-doc
625 %{__make} -C tools/lldb/docs lldb-cpp-doc
629 rm -rf $RPM_BUILD_ROOT
631 %{__make} -j1 -C build install \
632 DESTDIR=$RPM_BUILD_ROOT
634 # only some .pyc files are created by make install
635 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
636 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
638 # Adjust static analyzer installation
639 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
640 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
641 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
642 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
643 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
644 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
645 %py_postclean %{_datadir}/scan-view
647 # not installed by cmake buildsystem
648 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
651 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
652 # these tools are not installed
653 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
655 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
658 # Move documentation back to build directory
661 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
664 # and separate the apidoc
667 cp -a build/tools/clang/docs/html clang-apidoc
670 # And prepare Clang documentation
672 install -d clang-docs
673 for f in LICENSE.TXT NOTES.txt README.txt; do
674 ln tools/clang/$f clang-docs
677 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
679 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
681 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
682 # it seems it is used internally by an extra clang tool
683 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
685 # disable completeness check incompatible with split packaging
686 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
689 rm -rf $RPM_BUILD_ROOT
691 %post libs -p /sbin/ldconfig
692 %postun libs -p /sbin/ldconfig
694 %post -n clang-libs -p /sbin/ldconfig
695 %postun -n clang-libs -p /sbin/ldconfig
697 %post -n lldb -p /sbin/ldconfig
698 %postun -n lldb -p /sbin/ldconfig
701 %defattr(644,root,root,755)
702 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
703 %attr(755,root,root) %{_bindir}/bugpoint
704 %attr(755,root,root) %{_bindir}/dsymutil
705 %attr(755,root,root) %{_bindir}/llc
706 %attr(755,root,root) %{_bindir}/lli
707 %attr(755,root,root) %{_bindir}/llvm-addr2line
708 %attr(755,root,root) %{_bindir}/llvm-ar
709 %attr(755,root,root) %{_bindir}/llvm-as
710 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
711 %attr(755,root,root) %{_bindir}/llvm-cat
712 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
713 %attr(755,root,root) %{_bindir}/llvm-cov
714 %attr(755,root,root) %{_bindir}/llvm-cvtres
715 %attr(755,root,root) %{_bindir}/llvm-cxxdump
716 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
717 %attr(755,root,root) %{_bindir}/llvm-cxxmap
718 %attr(755,root,root) %{_bindir}/llvm-diff
719 %attr(755,root,root) %{_bindir}/llvm-dis
720 %attr(755,root,root) %{_bindir}/llvm-dlltool
721 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
722 %attr(755,root,root) %{_bindir}/llvm-dwp
723 %attr(755,root,root) %{_bindir}/llvm-elfabi
724 %attr(755,root,root) %{_bindir}/llvm-exegesis
725 %attr(755,root,root) %{_bindir}/llvm-extract
726 %attr(755,root,root) %{_bindir}/llvm-ifs
727 %attr(755,root,root) %{_bindir}/llvm-install-name-tool
728 %attr(755,root,root) %{_bindir}/llvm-jitlink
729 %attr(755,root,root) %{_bindir}/llvm-lib
730 %attr(755,root,root) %{_bindir}/llvm-link
731 %attr(755,root,root) %{_bindir}/llvm-lipo
732 %attr(755,root,root) %{_bindir}/llvm-lto
733 %attr(755,root,root) %{_bindir}/llvm-lto2
734 %attr(755,root,root) %{_bindir}/llvm-mc
735 %attr(755,root,root) %{_bindir}/llvm-mca
736 %attr(755,root,root) %{_bindir}/llvm-modextract
737 %attr(755,root,root) %{_bindir}/llvm-mt
738 %attr(755,root,root) %{_bindir}/llvm-nm
739 %attr(755,root,root) %{_bindir}/llvm-objcopy
740 %attr(755,root,root) %{_bindir}/llvm-objdump
741 %attr(755,root,root) %{_bindir}/llvm-opt-report
742 %attr(755,root,root) %{_bindir}/llvm-pdbutil
743 %attr(755,root,root) %{_bindir}/llvm-profdata
744 %attr(755,root,root) %{_bindir}/llvm-ranlib
745 %attr(755,root,root) %{_bindir}/llvm-rc
746 %attr(755,root,root) %{_bindir}/llvm-readelf
747 %attr(755,root,root) %{_bindir}/llvm-readobj
748 %attr(755,root,root) %{_bindir}/llvm-reduce
749 %attr(755,root,root) %{_bindir}/llvm-rtdyld
750 %attr(755,root,root) %{_bindir}/llvm-size
751 %attr(755,root,root) %{_bindir}/llvm-split
752 %attr(755,root,root) %{_bindir}/llvm-strip
753 %attr(755,root,root) %{_bindir}/llvm-stress
754 %attr(755,root,root) %{_bindir}/llvm-strings
755 %attr(755,root,root) %{_bindir}/llvm-symbolizer
756 %attr(755,root,root) %{_bindir}/llvm-tblgen
757 %attr(755,root,root) %{_bindir}/llvm-undname
758 %attr(755,root,root) %{_bindir}/llvm-xray
759 %attr(755,root,root) %{_bindir}/obj2yaml
760 %attr(755,root,root) %{_bindir}/opt
761 %attr(755,root,root) %{_bindir}/sancov
762 %attr(755,root,root) %{_bindir}/sanstats
763 %attr(755,root,root) %{_bindir}/verify-uselistorder
764 %attr(755,root,root) %{_bindir}/yaml2obj
766 %{_mandir}/man1/bugpoint.1*
767 %{_mandir}/man1/dsymutil.1*
768 %{_mandir}/man1/lit.1*
769 %{_mandir}/man1/llc.1*
770 %{_mandir}/man1/lli.1*
771 %{_mandir}/man1/llvm-addr2line.1*
772 %{_mandir}/man1/llvm-ar.1*
773 %{_mandir}/man1/llvm-as.1*
774 %{_mandir}/man1/llvm-bcanalyzer.1*
775 %{_mandir}/man1/llvm-cov.1*
776 %{_mandir}/man1/llvm-cxxfilt.1*
777 %{_mandir}/man1/llvm-cxxmap.1*
778 %{_mandir}/man1/llvm-diff.1*
779 %{_mandir}/man1/llvm-dis.1*
780 %{_mandir}/man1/llvm-dwarfdump.1*
781 %{_mandir}/man1/llvm-exegesis.1*
782 %{_mandir}/man1/llvm-extract.1*
783 %{_mandir}/man1/llvm-lib.1*
784 %{_mandir}/man1/llvm-link.1*
785 %{_mandir}/man1/llvm-lipo.1*
786 %{_mandir}/man1/llvm-locstats.1*
787 %{_mandir}/man1/llvm-mca.1*
788 %{_mandir}/man1/llvm-nm.1*
789 %{_mandir}/man1/llvm-objcopy.1*
790 %{_mandir}/man1/llvm-objdump.1*
791 %{_mandir}/man1/llvm-pdbutil.1*
792 %{_mandir}/man1/llvm-profdata.1*
793 %{_mandir}/man1/llvm-ranlib.1*
794 %{_mandir}/man1/llvm-readelf.1*
795 %{_mandir}/man1/llvm-readobj.1*
796 %{_mandir}/man1/llvm-size.1*
797 %{_mandir}/man1/llvm-stress.1*
798 %{_mandir}/man1/llvm-strings.1*
799 %{_mandir}/man1/llvm-strip.1*
800 %{_mandir}/man1/llvm-symbolizer.1*
801 %{_mandir}/man1/opt.1*
802 %{_mandir}/man1/tblgen.1*
806 %defattr(644,root,root,755)
807 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
809 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
810 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.10
811 %attr(755,root,root) %{_libdir}/LLVMgold.so
812 %attr(755,root,root) %{_libdir}/libRemarks.so.10
813 %attr(755,root,root) %{_libdir}/libclang-cpp.so.10
816 %defattr(644,root,root,755)
817 %attr(755,root,root) %{_bindir}/llvm-config
818 %attr(755,root,root) %{_libdir}/libLLVM.so
819 %attr(755,root,root) %{_libdir}/libLTO.so
820 %attr(755,root,root) %{_libdir}/libRemarks.so
821 %attr(755,root,root) %{_libdir}/libclang-cpp.so
822 %{_libdir}/libLLVM*.a
824 %{_includedir}/llvm-c
825 %{_libdir}/cmake/llvm
827 %{_mandir}/man1/llvm-config.1*
831 #%defattr(644,root,root,755)
835 %defattr(644,root,root,755)
841 %defattr(644,root,root,755)
842 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
843 %attr(755,root,root) %{_libdir}/LLVMPolly.so
846 %defattr(644,root,root,755)
847 %{_libdir}/libPolly.a
848 %{_libdir}/libPollyISL.a
849 %{_libdir}/libPollyPPCG.a
851 %{_libdir}/cmake/polly
855 %defattr(644,root,root,755)
856 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
857 %attr(755,root,root) %{_bindir}/clang
858 %attr(755,root,root) %{_bindir}/clang++
859 %attr(755,root,root) %{_bindir}/clang-%{abi}
860 %attr(755,root,root) %{_bindir}/clang-check
861 %attr(755,root,root) %{_bindir}/clang-cl
862 %attr(755,root,root) %{_bindir}/clang-cpp
863 %attr(755,root,root) %{_bindir}/clang-doc
864 %attr(755,root,root) %{_bindir}/clang-format
865 %attr(755,root,root) %{_bindir}/clang-import-test
866 %attr(755,root,root) %{_bindir}/clang-offload-bundler
867 %attr(755,root,root) %{_bindir}/clang-offload-wrapper
868 %attr(755,root,root) %{_bindir}/git-clang-format
869 %dir %{_libdir}/clang
870 %dir %{_libdir}/clang/%{version}
871 %{_libdir}/clang/%{version}/include
873 %ifarch %{x8664} aarch64
874 %dir %{_libdir}/clang/%{version}/bin
875 %attr(755,root,root) %{_libdir}/clang/%{version}/bin/hwasan_symbolize
877 %ifarch %{ix86} %{x8664} aarch64
878 %dir %{_libdir}/clang/%{version}/lib
879 %dir %{_libdir}/clang/%{version}/lib/linux
880 %dir %{_libdir}/clang/%{version}/share
884 %dir %{_libdir}/clang/%{version}/lib
885 %dir %{_libdir}/clang/%{version}/lib/linux
886 %dir %{_libdir}/clang/%{version}/share
890 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i*86.o
891 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
892 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
895 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
896 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
897 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
898 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
901 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-aarch64.o
902 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.a
903 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.so
904 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-aarch64.a.syms
906 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
907 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
909 %ifarch %{ix86} %{x8664} mips64 aarch64
910 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
912 %ifarch %{x8664} aarch64 mips64
913 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
914 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
916 %ifarch %{x8664} aarch64
917 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
921 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
922 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
923 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
924 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
925 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
929 %dir %{_datadir}/clang
930 %{_datadir}/clang/clang-format-diff.py
933 %defattr(644,root,root,755)
934 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
936 %if %{with rt} && %{with multilib}
938 %files -n clang-multilib
939 %defattr(644,root,root,755)
940 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i386.o
941 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
942 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
945 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
946 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
947 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
948 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
952 %files -n clang-analyzer
953 %defattr(644,root,root,755)
954 %attr(755,root,root) %{_bindir}/scan-build
955 %attr(755,root,root) %{_bindir}/scan-view
956 %{_datadir}/scan-build
957 %{_datadir}/scan-view
958 %{_mandir}/man1/scan-build.1*
959 %dir %{_libdir}/scan-build
960 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
961 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
963 %files -n clang-devel
964 %defattr(644,root,root,755)
965 %attr(755,root,root) %{_libdir}/libclang.so
966 %{_libdir}/libclang*.a
968 %{_includedir}/clang-c
969 %{_libdir}/cmake/clang
972 %defattr(644,root,root,755)
973 %doc tools/clang/docs/*.{html,png,txt}
976 %files -n clang-apidocs
977 %defattr(644,root,root,755)
981 %files -n clang-tools-extra
982 %defattr(644,root,root,755)
983 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
984 %attr(755,root,root) %{_bindir}/clang-apply-replacements
985 %attr(755,root,root) %{_bindir}/clang-change-namespace
986 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
987 %attr(755,root,root) %{_bindir}/clang-include-fixer
988 %attr(755,root,root) %{_bindir}/clang-move
989 %attr(755,root,root) %{_bindir}/clang-query
990 %attr(755,root,root) %{_bindir}/clang-refactor
991 %attr(755,root,root) %{_bindir}/clang-rename
992 %attr(755,root,root) %{_bindir}/clang-reorder-fields
993 %attr(755,root,root) %{_bindir}/clang-scan-deps
994 %attr(755,root,root) %{_bindir}/clang-tidy
995 %attr(755,root,root) %{_bindir}/clangd
996 %attr(755,root,root) %{_bindir}/diagtool
997 %attr(755,root,root) %{_bindir}/find-all-symbols
998 %attr(755,root,root) %{_bindir}/hmaptool
999 %attr(755,root,root) %{_bindir}/modularize
1000 %attr(755,root,root) %{_bindir}/pp-trace
1001 %{_datadir}/clang/clang-include-fixer.py
1002 %{_datadir}/clang/clang-tidy-diff.py
1003 %{_datadir}/clang/run-clang-tidy.py
1004 %{_datadir}/clang/run-find-all-symbols.py
1007 %defattr(644,root,root,755)
1008 %doc tools/lld/{LICENSE.TXT,README.md}
1009 %attr(755,root,root) %{_bindir}/ld.lld
1010 %attr(755,root,root) %{_bindir}/ld64.lld
1011 %attr(755,root,root) %{_bindir}/lld
1012 %attr(755,root,root) %{_bindir}/lld-link
1013 %attr(755,root,root) %{_bindir}/wasm-ld
1016 %defattr(644,root,root,755)
1017 %{_libdir}/liblld[ACDEHMRWXY]*.a
1022 %defattr(644,root,root,755)
1023 %attr(755,root,root) %{_bindir}/lldb
1024 %attr(755,root,root) %{_bindir}/lldb-argdumper
1025 %attr(755,root,root) %{_bindir}/lldb-instr
1026 %attr(755,root,root) %{_bindir}/lldb-server
1027 %attr(755,root,root) %{_bindir}/lldb-vscode
1028 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
1029 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.10
1030 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.10
1031 %dir %{py_sitedir}/lldb
1032 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
1033 %{py_sitedir}/lldb/formatters
1034 %{py_sitedir}/lldb/utils
1035 %{py_sitedir}/lldb/__init__.py[co]
1036 %{py_sitedir}/lldb/embedded_interpreter.py[co]
1037 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
1039 %files -n lldb-devel
1040 %defattr(644,root,root,755)
1041 %attr(755,root,root) %{_libdir}/liblldb.so
1042 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
1048 %defattr(644,root,root,755)
1049 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
1050 %dir %{_libdir}/ocaml/llvm
1051 %{_libdir}/ocaml/llvm/llvm*.cma
1052 %{_libdir}/ocaml/llvm/llvm*.cmi
1053 %{_libdir}/ocaml/META.llvm*
1056 %defattr(644,root,root,755)
1057 %{_libdir}/ocaml/llvm/libllvm*.a
1058 %{_libdir}/ocaml/llvm/llvm*.a
1059 %{_libdir}/ocaml/llvm/llvm*.cmx
1060 %{_libdir}/ocaml/llvm/llvm*.cmxa
1061 %{_libdir}/ocaml/llvm/llvm*.mli
1064 %defattr(644,root,root,755)
1069 %defattr(644,root,root,755)
1070 %{_datadir}/opt-viewer
1072 %files -n vim-plugin-clang
1073 %defattr(644,root,root,755)
1074 %{_datadir}/clang/clang-format.py
1075 %{_datadir}/clang/clang-rename.py