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
62 BuildRequires: cmake >= 3.4.3
64 BuildRequires: gcc >= 5:3.4
65 # gcc4 might be installed, but not current __cc
66 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
67 BuildRequires: __cc >= 3.4
70 BuildRequires: libedit-devel
71 BuildRequires: libltdl-devel
72 BuildRequires: libpfm-devel
73 BuildRequires: libstdc++-devel >= 5:3.4
74 BuildRequires: libxml2-devel >= 2
75 BuildRequires: ncurses-devel
77 BuildRequires: ocaml >= 4.00.0
78 BuildRequires: ocaml-ctypes-devel >= 0.4
79 BuildRequires: ocaml-findlib
80 BuildRequires: ocaml-ocamldoc
81 BuildRequires: ocaml-ounit >= 2
83 BuildRequires: perl-base >= 1:5.6
84 BuildRequires: perl-tools-pod
85 BuildRequires: python >= 1:2.7
86 BuildRequires: python-PyYAML
87 BuildRequires: python-pygments >= 2.0
88 BuildRequires: rpm-pythonprov
89 BuildRequires: rpmbuild(macros) >= 1.734
90 %{?with_doc:BuildRequires: sphinx-pdg}
91 BuildRequires: tar >= 1:1.22
93 %{?with_z3:BuildRequires: z3-devel >= 4.7.1}
94 BuildRequires: zlib-devel
96 BuildRequires: doxygen
97 BuildRequires: graphviz
100 BuildRequires: dejagnu
101 BuildRequires: tcl-devel
103 %if %{with rt} && %{with multilib}
105 BuildRequires: gcc-c++-multilib-32
106 BuildRequires: libstdc++-multilib-32-devel
109 BuildRequires: gcc-c++-multilib-32
110 BuildRequires: gcc-c++-multilib-64
111 BuildRequires: glibc-devel(x86_64)
112 BuildRequires: libstdc++-multilib-32-devel
113 BuildRequires: libstdc++-multilib-64-devel
117 BuildRequires: epydoc
119 BuildRequires: libatomic-devel
121 BuildRequires: libxml2-devel >= 2
122 BuildRequires: ncurses-ext-devel
123 BuildRequires: python-devel >= 1:2.7
124 %{?with_doc:BuildRequires: python3-recommonmark}
125 BuildRequires: swig-python >= 3.0.11
128 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
129 # private copy in polly/lib/External/isl
130 #BuildRequires: isl-devel >= 0.18
131 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
134 BuildConflicts: llvm-ocaml
136 Requires: %{name}-libs = %{version}-%{release}
137 # LLVM is not supported on PPC64
138 # http://llvm.org/bugs/show_bug.cgi?id=3729
140 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
143 %define _sysconfdir /etc/%{name}
145 %define specflags_ppc -fno-var-tracking-assignments
147 # objcopy: BFD (GNU Binutils) 2.32 assertion fail format.c:459
148 # objcopy: error: .../libLLVM-8.so(.debug_gnu_pubtypes) is too large (0x1ceee347 bytes)
149 # objcopy: .../libLLVM-8.so[.debug_gnu_pubtypes]: memory exhausted
151 %define _enable_debug_packages 0
153 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
154 # use -gsplit-dwarf only when building packages with debuginfo
155 # to avoid excessive disk space usage
156 %if 0%{?_enable_debug_packages}
157 %define specflags -gsplit-dwarf
160 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
161 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
163 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
164 # -Werror=format-security is for swig
165 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
166 %define filterout_c -fvar-tracking-assignments
167 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
168 %define filterout_ccpp -fvar-tracking-assignments
171 LLVM is a compiler infrastructure designed for compile-time,
172 link-time, runtime, and idle-time optimization of programs from
173 arbitrary programming languages. LLVM is written in C++ and has been
174 developed since 2000 at the University of Illinois and Apple. It
175 currently supports compilation of C and C++ programs using clang
178 %description -l pl.UTF-8
179 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
180 czasu kompilowania, linkowania, działania i bezczynności programów w
181 dowolnych językach programowania. Jest napisana w C++, rozwijana od
182 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
183 kompilację programów w C i C++ przy użyciu frontendu clang.
186 Summary: LLVM shared libraries
187 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
189 Conflicts: llvm < 3.2
192 LLVM shared libraries.
194 %description libs -l pl.UTF-8
195 Biblioteki współdzielone LLVM-a.
198 Summary: Static libraries and header files for LLVM
199 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
200 Group: Development/Languages
201 Requires: %{name}-libs = %{version}-%{release}
202 Requires: libstdc++-devel >= 6:3.4
205 This package contains static libraries and header files needed to
206 develop new native programs that use the LLVM infrastructure.
208 %description devel -l pl.UTF-8
209 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
210 potrzebne do tworzenia nowych programów natywnych wykorzystujących
214 Summary: Documentation for LLVM
215 Summary(pl.UTF-8): Dokumentacja do LLVM-a
217 # does not require base
220 Documentation for the LLVM compiler infrastructure.
222 %description doc -l pl.UTF-8
223 Dokumentacja do infrastruktury kompilatorów LLVM.
226 Summary: API documentation for LLVM
227 Summary(pl.UTF-8): Dokumentacja API LLVM-a
228 Group: Development/Languages
229 Requires: %{name}-doc = %{version}-%{release}
232 API documentation for the LLVM compiler infrastructure.
234 %description apidocs -l pl.UTF-8
235 Dokumentacja API infrastruktury kompilatorów LLVM.
238 Summary: Polyhedral optimizations for LLVM
239 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
240 Group: Development/Tools
241 URL: http://polly.llvm.org/
242 Requires: %{name} = %{version}-%{release}
245 Polly is a high-level loop and data-locality optimizer and
246 optimization infrastructure for LLVM. It uses an abstract mathematical
247 representation based on integer polyhedra to analyze and optimize the
248 memory access pattern of a program.
250 %description polly -l pl.UTF-8
251 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
252 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
253 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
254 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
257 Summary: Header files for LLVM Polly optimization infrastructure
258 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
259 Group: Development/Libraries
260 URL: http://polly.llvm.org/
261 Requires: %{name}-devel = %{version}-%{release}
262 Requires: %{name}-polly = %{version}-%{release}
264 %description polly-devel
265 Header files for LLVM Polly optimization infrastructure.
267 %description polly-devel -l pl.UTF-8
268 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
271 Summary: A C language family frontend for LLVM
272 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
274 Group: Development/Languages
275 Requires: %{name} = %{version}-%{release}
276 Requires: clang-libs = %{version}-%{release}
278 %description -n clang
279 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
280 of a crane or goose. 3. C-language family front-end toolkit.
282 The goal of the Clang project is to create a new C, C++, Objective C
283 and Objective C++ front-end for the LLVM compiler. Its tools are built
284 as libraries and designed to be loosely-coupled and extendable.
286 %description -n clang -l pl.UTF-8
287 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
288 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
291 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
292 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
293 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
296 %package -n clang-libs
297 Summary: Clang shared libraries
298 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
301 %description -n clang-libs
302 Clang shared libraries.
304 %description -n clang-libs -l pl.UTF-8
305 Biblioteki współdzielone Clanga.
307 %package -n clang-multilib
308 Summary: A C language family frontend for LLVM - 32-bit support
309 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
311 Group: Development/Languages
312 Requires: clang = %{version}-%{release}
314 %description -n clang-multilib
315 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
316 of a crane or goose. 3. C-language family front-end toolkit.
318 The goal of the Clang project is to create a new C, C++, Objective C
319 and Objective C++ front-end for the LLVM compiler. Its tools are built
320 as libraries and designed to be loosely-coupled and extendable.
322 This package contains the C compiler support for producing 32-bit
323 programs on 64-bit host.
325 %description -n clang-multilib -l pl.UTF-8
326 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
327 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
330 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
331 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
332 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
335 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
336 programów 32-bitowych na maszynie 64-bitowej.
338 %package -n clang-analyzer
339 Summary: A source code analysis framework
340 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
342 Group: Development/Languages
343 Requires: clang = %{version}-%{release}
344 # not picked up automatically since files are currently not instaled
345 # in standard Python hierarchies yet
348 %description -n clang-analyzer
349 The Clang Static Analyzer consists of both a source code analysis
350 framework and a standalone tool that finds bugs in C and Objective-C
351 programs. The standalone tool is invoked from the command-line, and is
352 intended to run in tandem with a build of a project or code base.
354 %description -n clang-analyzer -l pl.UTF-8
355 Clang Static Analyzer składa się ze szkieletu do analizy kodu
356 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
357 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
358 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
360 %package -n clang-devel
361 Summary: Header files for Clang
362 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
363 Group: Development/Languages
364 Requires: %{name}-devel = %{version}-%{release}
365 Requires: clang = %{version}-%{release}
366 %{?with_polly:Requires: llvm-polly-devel = %{version}-%{release}}
368 %description -n clang-devel
369 This package contains header files for the Clang compiler.
371 %description -n clang-devel -l pl.UTF-8
372 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
374 %package -n clang-doc
375 Summary: Documentation for Clang
376 Summary(pl.UTF-8): Dokumentacja do Clanga
378 Requires: %{name} = %{version}-%{release}
380 %description -n clang-doc
381 Documentation for the Clang compiler front-end.
383 %description -n clang-doc -l pl.UTF-8
384 Dokumentacja do frontendu kompilatora Clang.
386 %package -n clang-apidocs
387 Summary: API documentation for Clang
388 Summary(pl.UTF-8): Dokumentacja API Clanga
389 Group: Development/Languages
390 Requires: clang-doc = %{version}-%{release}
392 %description -n clang-apidocs
393 API documentation for the Clang compiler.
395 %description -n clang-apidocs -l pl.UTF-8
396 Dokumentacja API kompilatora Clang.
398 %package -n clang-tools-extra
399 Summary: Extra tools for Clang
400 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
401 Group: Development/Tools
402 URL: http://clang.llvm.org/docs/ClangTools.html
403 Requires: clang = %{version}-%{release}
405 %description -n clang-tools-extra
406 Extra tools for Clang.
408 %description -n clang-tools-extra -l pl.UTF-8
409 Dodatkowe narzędzia do kompilatora Clang.
412 Summary: The LLVM linker
413 Summary(pl.UTF-8): Konsolidator z projektu LLVM
414 Group: Development/Libraries
415 URL: http://lld.llvm.org/
416 Requires: %{name} = %{version}-%{release}
419 lld is a new set of modular code for creating linker tools.
421 %description -n lld -l pl.UTF-8
422 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
425 %package -n lld-devel
426 Summary: Development files for LLD linker tools
427 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
428 Group: Development/Tools
429 URL: http://lld.llvm.org/
430 Requires: %{name}-devel = %{version}-%{release}
432 %description -n lld-devel
433 Development files for LLD linker tools.
435 %description -n lld-devel -l pl.UTF-8
436 Pliki programistyczne narzędzi konsolidujących LLD.
439 Summary: Next generation high-performance debugger
440 Summary(pl.UTF-8): Wydajny debugger nowej generacji
441 Group: Development/Debuggers
442 URL: http://lldb.llvm.org/
443 Requires: %{name} = %{version}-%{release}
447 LLDB is a next generation, high-performance debugger. It is built as a
448 set of reusable components which highly leverage existing libraries in
449 the larger LLVM Project, such as the Clang expression parser and LLVM
452 %description -n lldb -l pl.UTF-8
453 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
454 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
455 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
458 %package -n lldb-devel
459 Summary: Development files for LLDB debugger
460 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
461 Group: Development/Libraries
462 URL: http://lldb.llvm.org/
463 Requires: %{name}-devel = %{version}-%{release}
464 Requires: clang-devel = %{version}-%{release}
465 Requires: lldb = %{version}-%{release}
467 %description -n lldb-devel
468 Development files for LLDB debugger.
470 %description -n lldb-devel -l pl.UTF-8
471 Pliki programistyczne debuggera LLDB.
474 Summary: OCaml binding for LLVM
475 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
477 Requires: %{name} = %{version}-%{release}
479 %requires_eq ocaml-runtime
483 OCaml binding for LLVM.
485 %description ocaml -l pl.UTF-8
486 Wiązanie OCamla do LLVM-a.
489 Summary: Development files for LLVM OCaml binding
490 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
491 Group: Development/Libraries
492 Requires: %{name}-devel = %{version}-%{release}
493 Requires: %{name}-ocaml = %{version}-%{release}
495 %description ocaml-devel
496 The llvm-ocaml-devel package contains libraries and signature files
497 for developing applications that use llvm-ocaml binding.
499 %description ocaml-devel -l pl.UTF-8
500 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
501 wykorzystujących wiązanie llvm-ocaml.
504 Summary: Documentation for LLVM's OCaml binding
505 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
507 Requires: %{name}-ocaml = %{version}-%{release}
509 %description ocaml-doc
510 HTML documentation for LLVM's OCaml binding.
512 %description ocaml-doc -l pl.UTF-8
513 Dokumentacja HTML wiązania OCamla do LLVM-a.
516 Summary: Optimization records visualization tools
517 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
518 Group: Development/Tools
519 Requires: %{name} = %{version}
522 %description opt-viewer
523 Optimization records visualization tools.
525 %description opt-viewer -l pl.UTF-8
526 Narzędzia do wizualizacji rekordów optymalizacji.
528 %package -n vim-plugin-clang
529 Summary: Clang format and rename integration for Vim
530 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
531 Group: Applications/Editors/Vim
532 Requires: vim-rt >= 4:7.0
535 %description -n vim-plugin-clang
536 Clang format and rename integration for Vim.
538 %description -n vim-plugin-clang -l pl.UTF-8
539 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
542 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
543 %{__mv} clang-%{version}.src tools/clang
544 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
545 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
546 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
547 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
548 %{__mv} lld-%{version}.src tools/lld
556 grep -rl /usr/bin/env projects tools utils | xargs sed -i -e '1{
557 s,^#!.*bin/env python,#!%{__python},
558 s,^#!.*bin/env perl,#!%{__perl},
561 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
562 s,^#!.*bin/python.*,#!%{__python},
568 # Disabling assertions now, rec. by pure and needed for OpenGTL
569 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
571 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
574 -DBUILD_SHARED_LIBS:BOOL=OFF \
575 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
576 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
577 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
578 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
579 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
580 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
582 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
584 %{?with_cxxmodules:-DLLVM_ENABLE_MODULES:BOOL=ON} \
585 -DLLVM_ENABLE_PIC:BOOL=ON \
586 -DLLVM_ENABLE_RTTI:BOOL=ON \
588 -DLLVM_ENABLE_SPHINX:BOOL=ON \
590 %{!?with_z3:-DLLVM_ENABLE_Z3_SOLVER:BOOL=OFF} \
591 %if "%{_lib}" == "lib64"
592 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
594 %if "%{_lib}" == "libx32"
595 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
597 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
598 -DSPHINX_WARNINGS_AS_ERRORS=OFF
602 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
605 %{__make} check 2>&1 | tee llvm-testlog.txt
606 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
610 %{__make} -C docs docs-llvm-html
611 %{__make} -C docs docs-llvm-man
613 %{__make} -C docs ocaml_doc
615 %{__make} -C tools/clang/docs docs-clang-html
616 %{__make} -C tools/clang/docs docs-clang-man
617 %{__make} -C tools/lld/docs docs-lld-html
618 # workaround failed import of _lldb
619 cp -pnL %{_lib}/python%{py_ver}/site-packages/lldb/_lldb.so tools/lldb/docs/lldb
621 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
622 -C tools/lldb/docs lldb-python-doc
623 %{__make} -C tools/lldb/docs lldb-cpp-doc
627 rm -rf $RPM_BUILD_ROOT
629 %{__make} -j1 -C build install \
630 DESTDIR=$RPM_BUILD_ROOT
632 # only some .pyc files are created by make install
633 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
634 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
636 # Adjust static analyzer installation
637 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
638 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
639 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
640 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
641 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
642 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
643 %py_postclean %{_datadir}/scan-view
645 # not installed by cmake buildsystem
646 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
649 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
650 # these tools are not installed
651 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
653 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
656 # Move documentation back to build directory
659 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
662 # and separate the apidoc
665 cp -a build/tools/clang/docs/html clang-apidoc
668 # And prepare Clang documentation
670 install -d clang-docs
671 for f in LICENSE.TXT NOTES.txt README.txt; do
672 ln tools/clang/$f clang-docs
675 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
677 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
679 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
680 # it seems it is used internally by an extra clang tool
681 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
683 # disable completeness check incompatible with split packaging
684 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
687 rm -rf $RPM_BUILD_ROOT
689 %post libs -p /sbin/ldconfig
690 %postun libs -p /sbin/ldconfig
692 %post -n clang-libs -p /sbin/ldconfig
693 %postun -n clang-libs -p /sbin/ldconfig
695 %post -n lldb -p /sbin/ldconfig
696 %postun -n lldb -p /sbin/ldconfig
699 %defattr(644,root,root,755)
700 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
701 %attr(755,root,root) %{_bindir}/bugpoint
702 %attr(755,root,root) %{_bindir}/dsymutil
703 %attr(755,root,root) %{_bindir}/llc
704 %attr(755,root,root) %{_bindir}/lli
705 %attr(755,root,root) %{_bindir}/llvm-addr2line
706 %attr(755,root,root) %{_bindir}/llvm-ar
707 %attr(755,root,root) %{_bindir}/llvm-as
708 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
709 %attr(755,root,root) %{_bindir}/llvm-cat
710 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
711 %attr(755,root,root) %{_bindir}/llvm-cov
712 %attr(755,root,root) %{_bindir}/llvm-cvtres
713 %attr(755,root,root) %{_bindir}/llvm-cxxdump
714 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
715 %attr(755,root,root) %{_bindir}/llvm-cxxmap
716 %attr(755,root,root) %{_bindir}/llvm-diff
717 %attr(755,root,root) %{_bindir}/llvm-dis
718 %attr(755,root,root) %{_bindir}/llvm-dlltool
719 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
720 %attr(755,root,root) %{_bindir}/llvm-dwp
721 %attr(755,root,root) %{_bindir}/llvm-elfabi
722 %attr(755,root,root) %{_bindir}/llvm-exegesis
723 %attr(755,root,root) %{_bindir}/llvm-extract
724 %attr(755,root,root) %{_bindir}/llvm-ifs
725 %attr(755,root,root) %{_bindir}/llvm-install-name-tool
726 %attr(755,root,root) %{_bindir}/llvm-jitlink
727 %attr(755,root,root) %{_bindir}/llvm-lib
728 %attr(755,root,root) %{_bindir}/llvm-link
729 %attr(755,root,root) %{_bindir}/llvm-lipo
730 %attr(755,root,root) %{_bindir}/llvm-lto
731 %attr(755,root,root) %{_bindir}/llvm-lto2
732 %attr(755,root,root) %{_bindir}/llvm-mc
733 %attr(755,root,root) %{_bindir}/llvm-mca
734 %attr(755,root,root) %{_bindir}/llvm-modextract
735 %attr(755,root,root) %{_bindir}/llvm-mt
736 %attr(755,root,root) %{_bindir}/llvm-nm
737 %attr(755,root,root) %{_bindir}/llvm-objcopy
738 %attr(755,root,root) %{_bindir}/llvm-objdump
739 %attr(755,root,root) %{_bindir}/llvm-opt-report
740 %attr(755,root,root) %{_bindir}/llvm-pdbutil
741 %attr(755,root,root) %{_bindir}/llvm-profdata
742 %attr(755,root,root) %{_bindir}/llvm-ranlib
743 %attr(755,root,root) %{_bindir}/llvm-rc
744 %attr(755,root,root) %{_bindir}/llvm-readelf
745 %attr(755,root,root) %{_bindir}/llvm-readobj
746 %attr(755,root,root) %{_bindir}/llvm-reduce
747 %attr(755,root,root) %{_bindir}/llvm-rtdyld
748 %attr(755,root,root) %{_bindir}/llvm-size
749 %attr(755,root,root) %{_bindir}/llvm-split
750 %attr(755,root,root) %{_bindir}/llvm-strip
751 %attr(755,root,root) %{_bindir}/llvm-stress
752 %attr(755,root,root) %{_bindir}/llvm-strings
753 %attr(755,root,root) %{_bindir}/llvm-symbolizer
754 %attr(755,root,root) %{_bindir}/llvm-tblgen
755 %attr(755,root,root) %{_bindir}/llvm-undname
756 %attr(755,root,root) %{_bindir}/llvm-xray
757 %attr(755,root,root) %{_bindir}/obj2yaml
758 %attr(755,root,root) %{_bindir}/opt
759 %attr(755,root,root) %{_bindir}/sancov
760 %attr(755,root,root) %{_bindir}/sanstats
761 %attr(755,root,root) %{_bindir}/verify-uselistorder
762 %attr(755,root,root) %{_bindir}/yaml2obj
764 %{_mandir}/man1/bugpoint.1*
765 %{_mandir}/man1/dsymutil.1*
766 %{_mandir}/man1/lit.1*
767 %{_mandir}/man1/llc.1*
768 %{_mandir}/man1/lli.1*
769 %{_mandir}/man1/llvm-addr2line.1*
770 %{_mandir}/man1/llvm-ar.1*
771 %{_mandir}/man1/llvm-as.1*
772 %{_mandir}/man1/llvm-bcanalyzer.1*
773 %{_mandir}/man1/llvm-cov.1*
774 %{_mandir}/man1/llvm-cxxfilt.1*
775 %{_mandir}/man1/llvm-cxxmap.1*
776 %{_mandir}/man1/llvm-diff.1*
777 %{_mandir}/man1/llvm-dis.1*
778 %{_mandir}/man1/llvm-dwarfdump.1*
779 %{_mandir}/man1/llvm-exegesis.1*
780 %{_mandir}/man1/llvm-extract.1*
781 %{_mandir}/man1/llvm-lib.1*
782 %{_mandir}/man1/llvm-link.1*
783 %{_mandir}/man1/llvm-lipo.1*
784 %{_mandir}/man1/llvm-locstats.1*
785 %{_mandir}/man1/llvm-mca.1*
786 %{_mandir}/man1/llvm-nm.1*
787 %{_mandir}/man1/llvm-objcopy.1*
788 %{_mandir}/man1/llvm-objdump.1*
789 %{_mandir}/man1/llvm-pdbutil.1*
790 %{_mandir}/man1/llvm-profdata.1*
791 %{_mandir}/man1/llvm-ranlib.1*
792 %{_mandir}/man1/llvm-readelf.1*
793 %{_mandir}/man1/llvm-readobj.1*
794 %{_mandir}/man1/llvm-size.1*
795 %{_mandir}/man1/llvm-stress.1*
796 %{_mandir}/man1/llvm-strings.1*
797 %{_mandir}/man1/llvm-strip.1*
798 %{_mandir}/man1/llvm-symbolizer.1*
799 %{_mandir}/man1/opt.1*
800 %{_mandir}/man1/tblgen.1*
804 %defattr(644,root,root,755)
805 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
807 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
808 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.10
809 %attr(755,root,root) %{_libdir}/LLVMgold.so
810 %attr(755,root,root) %{_libdir}/libRemarks.so.10
811 %attr(755,root,root) %{_libdir}/libclang-cpp.so.10
814 %defattr(644,root,root,755)
815 %attr(755,root,root) %{_bindir}/llvm-config
816 %attr(755,root,root) %{_libdir}/libLLVM.so
817 %attr(755,root,root) %{_libdir}/libLTO.so
818 %attr(755,root,root) %{_libdir}/libRemarks.so
819 %attr(755,root,root) %{_libdir}/libclang-cpp.so
820 %{_libdir}/libLLVM*.a
822 %{_includedir}/llvm-c
823 %{_libdir}/cmake/llvm
825 %{_mandir}/man1/llvm-config.1*
829 #%defattr(644,root,root,755)
833 %defattr(644,root,root,755)
839 %defattr(644,root,root,755)
840 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
841 %attr(755,root,root) %{_libdir}/LLVMPolly.so
844 %defattr(644,root,root,755)
845 %{_libdir}/libPolly.a
846 %{_libdir}/libPollyISL.a
847 %{_libdir}/libPollyPPCG.a
849 %{_libdir}/cmake/polly
853 %defattr(644,root,root,755)
854 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
855 %attr(755,root,root) %{_bindir}/clang
856 %attr(755,root,root) %{_bindir}/clang++
857 %attr(755,root,root) %{_bindir}/clang-%{abi}
858 %attr(755,root,root) %{_bindir}/clang-check
859 %attr(755,root,root) %{_bindir}/clang-cl
860 %attr(755,root,root) %{_bindir}/clang-cpp
861 %attr(755,root,root) %{_bindir}/clang-doc
862 %attr(755,root,root) %{_bindir}/clang-format
863 %attr(755,root,root) %{_bindir}/clang-import-test
864 %attr(755,root,root) %{_bindir}/clang-offload-bundler
865 %attr(755,root,root) %{_bindir}/clang-offload-wrapper
866 %attr(755,root,root) %{_bindir}/git-clang-format
867 %dir %{_libdir}/clang
868 %dir %{_libdir}/clang/%{version}
869 %{_libdir}/clang/%{version}/include
871 %dir %{_libdir}/clang/%{version}/bin
872 %attr(755,root,root) %{_libdir}/clang/%{version}/bin/hwasan_symbolize
873 %ifarch %{ix86} %{x8664}
874 %dir %{_libdir}/clang/%{version}/lib
875 %dir %{_libdir}/clang/%{version}/lib/linux
876 %dir %{_libdir}/clang/%{version}/share
880 %dir %{_libdir}/clang/%{version}/lib
881 %dir %{_libdir}/clang/%{version}/lib/linux
882 %dir %{_libdir}/clang/%{version}/share
886 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i*86.o
887 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
888 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
891 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
892 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
893 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
894 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
896 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
897 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
899 %ifarch %{ix86} %{x8664} mips64
900 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
902 %ifarch %{x8664} aarch64 mips64
903 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
904 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
906 %ifarch %{x8664} aarch64
907 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
911 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
912 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
913 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
914 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
915 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
919 %dir %{_datadir}/clang
920 %{_datadir}/clang/clang-format-diff.py
923 %defattr(644,root,root,755)
924 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
926 %if %{with rt} && %{with multilib}
928 %files -n clang-multilib
929 %defattr(644,root,root,755)
930 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-i386.o
931 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
932 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
935 %{_libdir}/clang/%{version}/lib/linux/clang_rt.*-x86_64.o
936 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
937 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
938 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
942 %files -n clang-analyzer
943 %defattr(644,root,root,755)
944 %attr(755,root,root) %{_bindir}/scan-build
945 %attr(755,root,root) %{_bindir}/scan-view
946 %{_datadir}/scan-build
947 %{_datadir}/scan-view
948 %{_mandir}/man1/scan-build.1*
949 %dir %{_libdir}/scan-build
950 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
951 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
953 %files -n clang-devel
954 %defattr(644,root,root,755)
955 %attr(755,root,root) %{_libdir}/libclang.so
956 %{_libdir}/libclang*.a
958 %{_includedir}/clang-c
959 %{_libdir}/cmake/clang
962 %defattr(644,root,root,755)
963 %doc tools/clang/docs/*.{html,png,txt}
966 %files -n clang-apidocs
967 %defattr(644,root,root,755)
971 %files -n clang-tools-extra
972 %defattr(644,root,root,755)
973 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
974 %attr(755,root,root) %{_bindir}/clang-apply-replacements
975 %attr(755,root,root) %{_bindir}/clang-change-namespace
976 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
977 %attr(755,root,root) %{_bindir}/clang-include-fixer
978 %attr(755,root,root) %{_bindir}/clang-move
979 %attr(755,root,root) %{_bindir}/clang-query
980 %attr(755,root,root) %{_bindir}/clang-refactor
981 %attr(755,root,root) %{_bindir}/clang-rename
982 %attr(755,root,root) %{_bindir}/clang-reorder-fields
983 %attr(755,root,root) %{_bindir}/clang-scan-deps
984 %attr(755,root,root) %{_bindir}/clang-tidy
985 %attr(755,root,root) %{_bindir}/clangd
986 %attr(755,root,root) %{_bindir}/diagtool
987 %attr(755,root,root) %{_bindir}/find-all-symbols
988 %attr(755,root,root) %{_bindir}/hmaptool
989 %attr(755,root,root) %{_bindir}/modularize
990 %attr(755,root,root) %{_bindir}/pp-trace
991 %{_datadir}/clang/clang-include-fixer.py
992 %{_datadir}/clang/clang-tidy-diff.py
993 %{_datadir}/clang/run-clang-tidy.py
994 %{_datadir}/clang/run-find-all-symbols.py
997 %defattr(644,root,root,755)
998 %doc tools/lld/{LICENSE.TXT,README.md}
999 %attr(755,root,root) %{_bindir}/ld.lld
1000 %attr(755,root,root) %{_bindir}/ld64.lld
1001 %attr(755,root,root) %{_bindir}/lld
1002 %attr(755,root,root) %{_bindir}/lld-link
1003 %attr(755,root,root) %{_bindir}/wasm-ld
1006 %defattr(644,root,root,755)
1007 %{_libdir}/liblld[ACDEHMRWXY]*.a
1012 %defattr(644,root,root,755)
1013 %attr(755,root,root) %{_bindir}/lldb
1014 %attr(755,root,root) %{_bindir}/lldb-argdumper
1015 %attr(755,root,root) %{_bindir}/lldb-instr
1016 %attr(755,root,root) %{_bindir}/lldb-server
1017 %attr(755,root,root) %{_bindir}/lldb-vscode
1018 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
1019 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.10
1020 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.10
1021 %dir %{py_sitedir}/lldb
1022 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
1023 %{py_sitedir}/lldb/formatters
1024 %{py_sitedir}/lldb/utils
1025 %{py_sitedir}/lldb/__init__.py[co]
1026 %{py_sitedir}/lldb/embedded_interpreter.py[co]
1027 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
1029 %files -n lldb-devel
1030 %defattr(644,root,root,755)
1031 %attr(755,root,root) %{_libdir}/liblldb.so
1032 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
1038 %defattr(644,root,root,755)
1039 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
1040 %dir %{_libdir}/ocaml/llvm
1041 %{_libdir}/ocaml/llvm/llvm*.cma
1042 %{_libdir}/ocaml/llvm/llvm*.cmi
1043 %{_libdir}/ocaml/META.llvm*
1046 %defattr(644,root,root,755)
1047 %{_libdir}/ocaml/llvm/libllvm*.a
1048 %{_libdir}/ocaml/llvm/llvm*.a
1049 %{_libdir}/ocaml/llvm/llvm*.cmx
1050 %{_libdir}/ocaml/llvm/llvm*.cmxa
1051 %{_libdir}/ocaml/llvm/llvm*.mli
1054 %defattr(644,root,root,755)
1059 %defattr(644,root,root,755)
1060 %{_datadir}/opt-viewer
1062 %files -n vim-plugin-clang
1063 %defattr(644,root,root,755)
1064 %{_datadir}/clang/clang-format.py
1065 %{_datadir}/clang/clang-rename.py