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_with ocaml # OCaml binding
21 %bcond_without doc # HTML docs and man pages
22 %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default)
23 %bcond_with tests # run tests
25 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
26 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
30 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
31 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
35 License: University of Illinois/NCSA Open Source License
36 Group: Development/Languages
37 #Source0Download: http://releases.llvm.org/download.html
38 Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz
39 # Source0-md5: 74818f431563603515a62be1ee69a142
40 Source1: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
41 # Source1-md5: 988b59cdb372c5a4f44ae4c39df3de73
42 Source2: http://releases.llvm.org/%{version}/compiler-rt-%{version}.src.tar.xz
43 # Source2-md5: 547893456e22c75d16189a13881bc866
44 Source3: http://releases.llvm.org/%{version}/lldb-%{version}.src.tar.xz
45 # Source3-md5: 9d319ed0f02a026242a85399938afed2
46 Source4: http://releases.llvm.org/%{version}/polly-%{version}.src.tar.xz
47 # Source4-md5: 7643bba808becabf35785fbacc413ee5
48 Source5: http://releases.llvm.org/%{version}/clang-tools-extra-%{version}.src.tar.xz
49 # Source5-md5: acd22ccbd06bfc0054027fe2644af1e0
50 Source6: http://releases.llvm.org/%{version}/lld-%{version}.src.tar.xz
51 # Source6-md5: c09fb102d4537a0c37a2e8e36a1dc6d2
52 Patch1: %{name}-tld.patch
53 Patch3: x32-gcc-toolchain.patch
54 Patch4: cmake-buildtype.patch
55 Patch5: %{name}-ocaml-shared.patch
59 BuildRequires: cmake >= 3.4.3
61 BuildRequires: gcc >= 5:3.4
62 # gcc4 might be installed, but not current __cc
63 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
64 BuildRequires: __cc >= 3.4
67 BuildRequires: libedit-devel
68 BuildRequires: libltdl-devel
69 BuildRequires: libstdc++-devel >= 5:3.4
70 BuildRequires: ncurses-devel
72 BuildRequires: ocaml >= 4.00.0
73 BuildRequires: ocaml-ctypes-devel >= 0.4
74 BuildRequires: ocaml-findlib
75 BuildRequires: ocaml-ocamldoc
76 BuildRequires: ocaml-ounit >= 2
78 BuildRequires: perl-base >= 1:5.6
79 BuildRequires: perl-tools-pod
80 BuildRequires: python >= 1:2.7
81 BuildRequires: rpm-pythonprov
82 BuildRequires: rpmbuild(macros) >= 1.734
83 %{?with_doc:BuildRequires: sphinx-pdg}
84 BuildRequires: tar >= 1:1.22
86 BuildRequires: zlib-devel
88 BuildRequires: doxygen
89 BuildRequires: graphviz
92 BuildRequires: dejagnu
93 BuildRequires: tcl-devel
95 %if %{with rt} && %{with multilib}
97 BuildRequires: gcc-c++-multilib-32
98 BuildRequires: libstdc++-multilib-32-devel
101 BuildRequires: gcc-c++-multilib-32
102 BuildRequires: gcc-c++-multilib-64
103 BuildRequires: glibc-devel(x86_64)
104 BuildRequires: libstdc++-multilib-32-devel
105 BuildRequires: libstdc++-multilib-64-devel
109 BuildRequires: epydoc
111 BuildRequires: libatomic-devel
113 BuildRequires: libxml2-devel >= 2
114 BuildRequires: ncurses-ext-devel
115 BuildRequires: python-devel >= 2
116 BuildRequires: swig-python >= 3.0.11
119 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
120 # private copy in polly/lib/External/isl
121 #BuildRequires: isl-devel >= 0.18
122 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
125 BuildConflicts: llvm-ocaml
127 Requires: %{name}-libs = %{version}-%{release}
128 # LLVM is not supported on PPC64
129 # http://llvm.org/bugs/show_bug.cgi?id=3729
131 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
134 %define _sysconfdir /etc/%{name}
136 %define specflags_ppc -fno-var-tracking-assignments
137 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
138 # use -gsplit-dwarf only when building packages with debuginfo
139 # to avoid excessive disk space usage
140 %if 0%{?_enable_debug_packages}
141 %define specflags -gsplit-dwarf
144 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
145 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
147 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
148 # -Werror=format-security is for swig
149 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
150 %define filterout_c -fvar-tracking-assignments
151 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
152 %define filterout_ccpp -fvar-tracking-assignments
155 LLVM is a compiler infrastructure designed for compile-time,
156 link-time, runtime, and idle-time optimization of programs from
157 arbitrary programming languages. LLVM is written in C++ and has been
158 developed since 2000 at the University of Illinois and Apple. It
159 currently supports compilation of C and C++ programs using clang
162 %description -l pl.UTF-8
163 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
164 czasu kompilowania, linkowania, działania i bezczynności programów w
165 dowolnych językach programowania. Jest napisana w C++, rozwijana od
166 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
167 kompilację programów w C i C++ przy użyciu frontendu clang.
170 Summary: LLVM shared libraries
171 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
173 Conflicts: llvm < 3.2
176 LLVM shared libraries.
178 %description libs -l pl.UTF-8
179 Biblioteki współdzielone LLVM-a.
182 Summary: Static libraries and header files for LLVM
183 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
184 Group: Development/Languages
185 Requires: %{name}-libs = %{version}-%{release}
186 Requires: libstdc++-devel >= 6:3.4
189 This package contains static libraries and header files needed to
190 develop new native programs that use the LLVM infrastructure.
192 %description devel -l pl.UTF-8
193 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
194 potrzebne do tworzenia nowych programów natywnych wykorzystujących
198 Summary: Documentation for LLVM
199 Summary(pl.UTF-8): Dokumentacja do LLVM-a
201 # does not require base
204 Documentation for the LLVM compiler infrastructure.
206 %description doc -l pl.UTF-8
207 Dokumentacja do infrastruktury kompilatorów LLVM.
210 Summary: API documentation for LLVM
211 Summary(pl.UTF-8): Dokumentacja API LLVM-a
212 Group: Development/Languages
213 Requires: %{name}-doc = %{version}-%{release}
216 API documentation for the LLVM compiler infrastructure.
218 %description apidocs -l pl.UTF-8
219 Dokumentacja API infrastruktury kompilatorów LLVM.
222 Summary: Polyhedral optimizations for LLVM
223 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
224 Group: Development/Tools
225 URL: http://polly.llvm.org/
226 Requires: %{name} = %{version}-%{release}
229 Polly is a high-level loop and data-locality optimizer and
230 optimization infrastructure for LLVM. It uses an abstract mathematical
231 representation based on integer polyhedra to analyze and optimize the
232 memory access pattern of a program.
234 %description polly -l pl.UTF-8
235 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
236 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
237 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
238 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
241 Summary: Header files for LLVM Polly optimization infrastructure
242 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
243 Group: Development/Libraries
244 URL: http://polly.llvm.org/
245 Requires: %{name}-devel = %{version}-%{release}
246 Requires: %{name}-polly = %{version}-%{release}
248 %description polly-devel
249 Header files for LLVM Polly optimization infrastructure.
251 %description polly-devel -l pl.UTF-8
252 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
255 Summary: A C language family frontend for LLVM
256 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
258 Group: Development/Languages
259 Requires: %{name} = %{version}-%{release}
260 Requires: clang-libs = %{version}-%{release}
262 %description -n clang
263 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
264 of a crane or goose. 3. C-language family front-end toolkit.
266 The goal of the Clang project is to create a new C, C++, Objective C
267 and Objective C++ front-end for the LLVM compiler. Its tools are built
268 as libraries and designed to be loosely-coupled and extendable.
270 %description -n clang -l pl.UTF-8
271 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
272 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
275 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
276 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
277 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
280 %package -n clang-libs
281 Summary: Clang shared libraries
282 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
285 %description -n clang-libs
286 Clang shared libraries.
288 %description -n clang-libs -l pl.UTF-8
289 Biblioteki współdzielone Clanga.
291 %package -n clang-multilib
292 Summary: A C language family frontend for LLVM - 32-bit support
293 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
295 Group: Development/Languages
296 Requires: clang = %{version}-%{release}
298 %description -n clang-multilib
299 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
300 of a crane or goose. 3. C-language family front-end toolkit.
302 The goal of the Clang project is to create a new C, C++, Objective C
303 and Objective C++ front-end for the LLVM compiler. Its tools are built
304 as libraries and designed to be loosely-coupled and extendable.
306 This package contains the C compiler support for producing 32-bit
307 programs on 64-bit host.
309 %description -n clang-multilib -l pl.UTF-8
310 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
311 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
314 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
315 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
316 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
319 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
320 programów 32-bitowych na maszynie 64-bitowej.
322 %package -n clang-analyzer
323 Summary: A source code analysis framework
324 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
326 Group: Development/Languages
327 Requires: clang = %{version}-%{release}
328 # not picked up automatically since files are currently not instaled
329 # in standard Python hierarchies yet
332 %description -n clang-analyzer
333 The Clang Static Analyzer consists of both a source code analysis
334 framework and a standalone tool that finds bugs in C and Objective-C
335 programs. The standalone tool is invoked from the command-line, and is
336 intended to run in tandem with a build of a project or code base.
338 %description -n clang-analyzer -l pl.UTF-8
339 Clang Static Analyzer składa się ze szkieletu do analizy kodu
340 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
341 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
342 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
344 %package -n clang-devel
345 Summary: Header files for Clang
346 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
347 Group: Development/Languages
348 Requires: %{name}-devel = %{version}-%{release}
349 Requires: clang = %{version}-%{release}
351 %description -n clang-devel
352 This package contains header files for the Clang compiler.
354 %description -n clang-devel -l pl.UTF-8
355 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
357 %package -n clang-doc
358 Summary: Documentation for Clang
359 Summary(pl.UTF-8): Dokumentacja do Clanga
361 Requires: %{name} = %{version}-%{release}
363 %description -n clang-doc
364 Documentation for the Clang compiler front-end.
366 %description -n clang-doc -l pl.UTF-8
367 Dokumentacja do frontendu kompilatora Clang.
369 %package -n clang-apidocs
370 Summary: API documentation for Clang
371 Summary(pl.UTF-8): Dokumentacja API Clanga
372 Group: Development/Languages
373 Requires: clang-doc = %{version}-%{release}
375 %description -n clang-apidocs
376 API documentation for the Clang compiler.
378 %description -n clang-apidocs -l pl.UTF-8
379 Dokumentacja API kompilatora Clang.
381 %package -n clang-tools-extra
382 Summary: Extra tools for Clang
383 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
384 Group: Development/Tools
385 URL: http://clang.llvm.org/docs/ClangTools.html
386 Requires: clang = %{version}-%{release}
388 %description -n clang-tools-extra
389 Extra tools for Clang.
391 %description -n clang-tools-extra -l pl.UTF-8
392 Dodatkowe narzędzia do kompilatora Clang.
395 Summary: The LLVM linker
396 Summary(pl.UTF-8): Konsolidator z projektu LLVM
397 Group: Development/Libraries
398 URL: http://lld.llvm.org/
399 Requires: %{name} = %{version}-%{release}
402 lld is a new set of modular code for creating linker tools.
404 %description -n lld -l pl.UTF-8
405 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
408 %package -n lld-devel
409 Summary: Development files for LLD linker tools
410 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
411 Group: Development/Tools
412 URL: http://lld.llvm.org/
413 Requires: %{name}-devel = %{version}-%{release}
415 %description -n lld-devel
416 Development files for LLD linker tools.
418 %description -n lld-devel -l pl.UTF-8
419 Pliki programistyczne narzędzi konsolidujących LLD.
422 Summary: Next generation high-performance debugger
423 Summary(pl.UTF-8): Wydajny debugger nowej generacji
424 Group: Development/Debuggers
425 URL: http://lldb.llvm.org/
426 Requires: %{name} = %{version}-%{release}
430 LLDB is a next generation, high-performance debugger. It is built as a
431 set of reusable components which highly leverage existing libraries in
432 the larger LLVM Project, such as the Clang expression parser and LLVM
435 %description -n lldb -l pl.UTF-8
436 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
437 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
438 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
441 %package -n lldb-devel
442 Summary: Development files for LLDB debugger
443 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
444 Group: Development/Libraries
445 URL: http://lldb.llvm.org/
446 Requires: %{name}-devel = %{version}-%{release}
447 Requires: clang-devel = %{version}-%{release}
448 Requires: lldb = %{version}-%{release}
450 %description -n lldb-devel
451 Development files for LLDB debugger.
453 %description -n lldb-devel -l pl.UTF-8
454 Pliki programistyczne debuggera LLDB.
457 Summary: OCaml binding for LLVM
458 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
460 Requires: %{name} = %{version}-%{release}
462 %requires_eq ocaml-runtime
466 OCaml binding for LLVM.
468 %description ocaml -l pl.UTF-8
469 Wiązanie OCamla do LLVM-a.
472 Summary: Development files for LLVM OCaml binding
473 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
474 Group: Development/Libraries
475 Requires: %{name}-devel = %{version}-%{release}
476 Requires: %{name}-ocaml = %{version}-%{release}
478 %description ocaml-devel
479 The llvm-ocaml-devel package contains libraries and signature files
480 for developing applications that use llvm-ocaml binding.
482 %description ocaml-devel -l pl.UTF-8
483 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
484 wykorzystujących wiązanie llvm-ocaml.
487 Summary: Documentation for LLVM's OCaml binding
488 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
490 Requires: %{name}-ocaml = %{version}-%{release}
492 %description ocaml-doc
493 HTML documentation for LLVM's OCaml binding.
495 %description ocaml-doc -l pl.UTF-8
496 Dokumentacja HTML wiązania OCamla do LLVM-a.
499 Summary: Optimization records visualization tools
500 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
501 Group: Development/Tools
502 Requires: %{name} = %{version}
505 %description opt-viewer
506 Optimization records visualization tools.
508 %description opt-viewer -l pl.UTF-8
509 Narzędzia do wizualizacji rekordów optymalizacji.
511 %package -n vim-plugin-clang
512 Summary: Clang format and rename integration for Vim
513 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
514 Group: Applications/Editors/Vim
515 Requires: vim-rt >= 4:7.0
518 %description -n vim-plugin-clang
519 Clang format and rename integration for Vim.
521 %description -n vim-plugin-clang -l pl.UTF-8
522 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
525 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
526 %{__mv} cfe-%{version}.src tools/clang
527 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
528 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
529 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
530 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
531 %{__mv} lld-%{version}.src tools/lld
538 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
539 s,^#!.*bin/env python,#!%{__python},
540 s,^#!.*bin/env perl,#!%{__perl},
543 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
544 s,^#!.*bin/python.*,#!%{__python},
550 # Disabling assertions now, rec. by pure and needed for OpenGTL
551 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
553 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
556 %if "%{_lib}" == "lib64"
557 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
559 %if "%{_lib}" == "libx32"
560 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
563 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
566 -DLLVM_ENABLE_SPHINX:BOOL=ON \
567 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
569 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
570 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
571 -DLLVM_ENABLE_RTTI:BOOL=ON \
572 -DLLVM_ENABLE_PIC:BOOL=ON \
573 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
574 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
575 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
576 -DBUILD_SHARED_LIBS:BOOL=OFF \
577 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
578 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
583 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
586 %{__make} check 2>&1 | tee llvm-testlog.txt
587 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
591 %{__make} -C docs docs-llvm-html
592 %{__make} -C docs docs-llvm-man
594 %{__make} -C docs ocaml_doc
596 %{__make} -C tools/clang/docs docs-clang-html
597 %{__make} -C tools/clang/docs docs-clang-man
598 %{__make} -C tools/lld/docs docs-lld-html
600 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
601 -C tools/lldb/docs lldb-python-doc
602 %{__make} -C tools/lldb/docs lldb-cpp-doc
606 rm -rf $RPM_BUILD_ROOT
608 %{__make} -j1 -C build install \
609 DESTDIR=$RPM_BUILD_ROOT
611 # only some .pyc files are created by make install
612 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
613 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
615 # Adjust static analyzer installation
616 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
617 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
618 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
619 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
620 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
621 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
622 %py_postclean %{_datadir}/scan-view
624 # not installed by cmake buildsystem
625 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
628 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
629 # these tools are not installed
630 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
632 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
635 # Move documentation back to build directory
638 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
641 # and separate the apidoc
644 cp -a build/tools/clang/docs/html clang-apidoc
647 # And prepare Clang documentation
649 install -d clang-docs
650 for f in LICENSE.TXT NOTES.txt README.txt; do
651 ln tools/clang/$f clang-docs
654 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
656 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
658 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
659 # it seems it is used internally by an extra clang tool
660 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
662 # disable completeness check incompatible with split packaging
663 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
666 rm -rf $RPM_BUILD_ROOT
668 %post libs -p /sbin/ldconfig
669 %postun libs -p /sbin/ldconfig
671 %post -n clang-libs -p /sbin/ldconfig
672 %postun -n clang-libs -p /sbin/ldconfig
674 %post -n lldb -p /sbin/ldconfig
675 %postun -n lldb -p /sbin/ldconfig
678 %defattr(644,root,root,755)
679 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
680 %attr(755,root,root) %{_bindir}/bugpoint
681 %attr(755,root,root) %{_bindir}/dsymutil
682 %attr(755,root,root) %{_bindir}/llc
683 %attr(755,root,root) %{_bindir}/lli
684 %attr(755,root,root) %{_bindir}/llvm-ar
685 %attr(755,root,root) %{_bindir}/llvm-as
686 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
687 %attr(755,root,root) %{_bindir}/llvm-cat
688 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
689 %attr(755,root,root) %{_bindir}/llvm-cov
690 %attr(755,root,root) %{_bindir}/llvm-cvtres
691 %attr(755,root,root) %{_bindir}/llvm-cxxdump
692 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
693 %attr(755,root,root) %{_bindir}/llvm-cxxmap
694 %attr(755,root,root) %{_bindir}/llvm-diff
695 %attr(755,root,root) %{_bindir}/llvm-dis
696 %attr(755,root,root) %{_bindir}/llvm-dlltool
697 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
698 %attr(755,root,root) %{_bindir}/llvm-dwp
699 %attr(755,root,root) %{_bindir}/llvm-elfabi
700 %attr(755,root,root) %{_bindir}/llvm-exegesis
701 %attr(755,root,root) %{_bindir}/llvm-extract
702 %attr(755,root,root) %{_bindir}/llvm-lib
703 %attr(755,root,root) %{_bindir}/llvm-link
704 %attr(755,root,root) %{_bindir}/llvm-lto
705 %attr(755,root,root) %{_bindir}/llvm-lto2
706 %attr(755,root,root) %{_bindir}/llvm-mc
707 %attr(755,root,root) %{_bindir}/llvm-mca
708 %attr(755,root,root) %{_bindir}/llvm-modextract
709 %attr(755,root,root) %{_bindir}/llvm-mt
710 %attr(755,root,root) %{_bindir}/llvm-nm
711 %attr(755,root,root) %{_bindir}/llvm-objcopy
712 %attr(755,root,root) %{_bindir}/llvm-objdump
713 %attr(755,root,root) %{_bindir}/llvm-opt-report
714 %attr(755,root,root) %{_bindir}/llvm-pdbutil
715 %attr(755,root,root) %{_bindir}/llvm-profdata
716 %attr(755,root,root) %{_bindir}/llvm-ranlib
717 %attr(755,root,root) %{_bindir}/llvm-rc
718 %attr(755,root,root) %{_bindir}/llvm-readelf
719 %attr(755,root,root) %{_bindir}/llvm-readobj
720 %attr(755,root,root) %{_bindir}/llvm-rtdyld
721 %attr(755,root,root) %{_bindir}/llvm-size
722 %attr(755,root,root) %{_bindir}/llvm-split
723 %attr(755,root,root) %{_bindir}/llvm-strip
724 %attr(755,root,root) %{_bindir}/llvm-stress
725 %attr(755,root,root) %{_bindir}/llvm-strings
726 %attr(755,root,root) %{_bindir}/llvm-symbolizer
727 %attr(755,root,root) %{_bindir}/llvm-tblgen
728 %attr(755,root,root) %{_bindir}/llvm-undname
729 %attr(755,root,root) %{_bindir}/llvm-xray
730 %attr(755,root,root) %{_bindir}/obj2yaml
731 %attr(755,root,root) %{_bindir}/opt
732 %attr(755,root,root) %{_bindir}/sancov
733 %attr(755,root,root) %{_bindir}/sanstats
734 %attr(755,root,root) %{_bindir}/verify-uselistorder
735 %attr(755,root,root) %{_bindir}/yaml2obj
737 %{_mandir}/man1/bugpoint.1*
738 %{_mandir}/man1/dsymutil.1*
739 %{_mandir}/man1/lit.1*
740 %{_mandir}/man1/llc.1*
741 %{_mandir}/man1/lli.1*
742 %{_mandir}/man1/llvm-ar.1*
743 %{_mandir}/man1/llvm-as.1*
744 %{_mandir}/man1/llvm-bcanalyzer.1*
745 %{_mandir}/man1/llvm-cov.1*
746 %{_mandir}/man1/llvm-cxxmap.1*
747 %{_mandir}/man1/llvm-diff.1*
748 %{_mandir}/man1/llvm-dis.1*
749 %{_mandir}/man1/llvm-dwarfdump.1*
750 %{_mandir}/man1/llvm-exegesis.1*
751 %{_mandir}/man1/llvm-extract.1*
752 %{_mandir}/man1/llvm-lib.1*
753 %{_mandir}/man1/llvm-link.1*
754 %{_mandir}/man1/llvm-mca.1*
755 %{_mandir}/man1/llvm-nm.1*
756 %{_mandir}/man1/llvm-objdump.1*
757 %{_mandir}/man1/llvm-pdbutil.1*
758 %{_mandir}/man1/llvm-profdata.1*
759 %{_mandir}/man1/llvm-ranlib.1*
760 %{_mandir}/man1/llvm-readobj.1*
761 %{_mandir}/man1/llvm-stress.1*
762 %{_mandir}/man1/llvm-symbolizer.1*
763 %{_mandir}/man1/opt.1*
764 %{_mandir}/man1/tblgen.1*
768 %defattr(644,root,root,755)
769 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
771 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
772 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.8
773 %attr(755,root,root) %{_libdir}/LLVMgold.so
774 %attr(755,root,root) %{_libdir}/libOptRemarks.so.8
777 %defattr(644,root,root,755)
778 %attr(755,root,root) %{_bindir}/llvm-config
779 %attr(755,root,root) %{_libdir}/libLLVM.so
780 %attr(755,root,root) %{_libdir}/libLTO.so
781 %attr(755,root,root) %{_libdir}/libOptRemarks.so
782 %{_libdir}/libLLVM*.a
784 %{_includedir}/llvm-c
785 %{_libdir}/cmake/llvm
787 %{_mandir}/man1/llvm-config.1*
791 #%defattr(644,root,root,755)
795 %defattr(644,root,root,755)
801 %defattr(644,root,root,755)
802 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
803 %attr(755,root,root) %{_libdir}/LLVMPolly.so
806 %defattr(644,root,root,755)
807 %{_libdir}/libPolly.a
808 %{_libdir}/libPollyISL.a
809 %{_libdir}/libPollyPPCG.a
811 %{_libdir}/cmake/polly
815 %defattr(644,root,root,755)
816 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
817 %attr(755,root,root) %{_bindir}/clang
818 %attr(755,root,root) %{_bindir}/clang++
819 %attr(755,root,root) %{_bindir}/clang-%{abi}
820 %attr(755,root,root) %{_bindir}/clang-check
821 %attr(755,root,root) %{_bindir}/clang-cl
822 %attr(755,root,root) %{_bindir}/clang-cpp
823 %attr(755,root,root) %{_bindir}/clang-format
824 %attr(755,root,root) %{_bindir}/clang-import-test
825 %attr(755,root,root) %{_bindir}/clang-offload-bundler
826 %attr(755,root,root) %{_bindir}/git-clang-format
827 %dir %{_libdir}/clang
828 %dir %{_libdir}/clang/%{version}
829 %{_libdir}/clang/%{version}/include
831 %ifarch %{ix86} %{x8664}
832 %dir %{_libdir}/clang/%{version}/lib
833 %dir %{_libdir}/clang/%{version}/lib/linux
834 %dir %{_libdir}/clang/%{version}/share
838 %dir %{_libdir}/clang/%{version}/lib
839 %dir %{_libdir}/clang/%{version}/lib/linux
840 %dir %{_libdir}/clang/%{version}/share
844 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
845 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
848 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
849 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
850 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
852 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
853 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
855 %ifarch %{ix86} %{x8664} mips64
856 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
858 %ifarch %{x8664} aarch64 mips64
859 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
860 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
862 %ifarch %{x8664} aarch64
863 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
867 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
868 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
869 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
870 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
871 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
875 %dir %{_datadir}/clang
876 %{_datadir}/clang/clang-format-diff.py
879 %defattr(644,root,root,755)
880 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
882 %if %{with rt} && %{with multilib}
884 %files -n clang-multilib
885 %defattr(644,root,root,755)
886 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
887 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
890 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
891 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
892 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
896 %files -n clang-analyzer
897 %defattr(644,root,root,755)
898 %attr(755,root,root) %{_bindir}/scan-build
899 %attr(755,root,root) %{_bindir}/scan-view
900 %{_datadir}/scan-build
901 %{_datadir}/scan-view
902 %{_mandir}/man1/scan-build.1*
903 %dir %{_libdir}/scan-build
904 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
905 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
907 %files -n clang-devel
908 %defattr(644,root,root,755)
909 %attr(755,root,root) %{_libdir}/libclang.so
910 %{_libdir}/libclang*.a
912 %{_includedir}/clang-c
913 %{_libdir}/cmake/clang
916 %defattr(644,root,root,755)
917 %doc tools/clang/docs/*.{html,png,txt}
920 %files -n clang-apidocs
921 %defattr(644,root,root,755)
925 %files -n clang-tools-extra
926 %defattr(644,root,root,755)
927 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
928 %attr(755,root,root) %{_bindir}/clang-apply-replacements
929 %attr(755,root,root) %{_bindir}/clang-change-namespace
930 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
931 %attr(755,root,root) %{_bindir}/clang-include-fixer
932 %attr(755,root,root) %{_bindir}/clang-query
933 %attr(755,root,root) %{_bindir}/clang-refactor
934 %attr(755,root,root) %{_bindir}/clang-rename
935 %attr(755,root,root) %{_bindir}/clang-reorder-fields
936 %attr(755,root,root) %{_bindir}/clang-tidy
937 %attr(755,root,root) %{_bindir}/clangd
938 %attr(755,root,root) %{_bindir}/diagtool
939 %attr(755,root,root) %{_bindir}/find-all-symbols
940 %attr(755,root,root) %{_bindir}/hmaptool
941 %attr(755,root,root) %{_bindir}/modularize
942 %attr(755,root,root) %{_bindir}/pp-trace
943 %{_datadir}/clang/clang-include-fixer.py
944 %{_datadir}/clang/clang-tidy-diff.py
945 %{_datadir}/clang/run-clang-tidy.py
946 %{_datadir}/clang/run-find-all-symbols.py
949 %defattr(644,root,root,755)
950 %doc tools/lld/{LICENSE.TXT,README.md}
951 %attr(755,root,root) %{_bindir}/ld.lld
952 %attr(755,root,root) %{_bindir}/ld64.lld
953 %attr(755,root,root) %{_bindir}/lld
954 %attr(755,root,root) %{_bindir}/lld-link
955 %attr(755,root,root) %{_bindir}/wasm-ld
958 %defattr(644,root,root,755)
959 %{_libdir}/liblld[ACDEHMRWXY]*.a
964 %defattr(644,root,root,755)
965 %attr(755,root,root) %{_bindir}/lldb
966 %attr(755,root,root) %{_bindir}/lldb-argdumper
967 %attr(755,root,root) %{_bindir}/lldb-mi
968 %attr(755,root,root) %{_bindir}/lldb-server
969 %attr(755,root,root) %{_bindir}/lldb-test
970 %attr(755,root,root) %{_bindir}/lldb-vscode
971 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
972 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.8
973 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.8
974 %dir %{py_sitedir}/lldb
975 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
976 %{py_sitedir}/lldb/formatters
977 %{py_sitedir}/lldb/runtime
978 %{py_sitedir}/lldb/utils
979 %{py_sitedir}/lldb/__init__.py[co]
980 %{py_sitedir}/lldb/embedded_interpreter.py[co]
981 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
982 %attr(755,root,root) %{py_sitedir}/readline.so
985 %defattr(644,root,root,755)
986 %attr(755,root,root) %{_libdir}/liblldb.so
987 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
988 %{_libdir}/liblldb*.a
994 %defattr(644,root,root,755)
995 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
996 %dir %{_libdir}/ocaml/llvm
997 %{_libdir}/ocaml/llvm/llvm*.cma
998 %{_libdir}/ocaml/llvm/llvm*.cmi
999 %{_libdir}/ocaml/META.llvm*
1002 %defattr(644,root,root,755)
1003 %{_libdir}/ocaml/llvm/libllvm*.a
1004 %{_libdir}/ocaml/llvm/llvm*.a
1005 %{_libdir}/ocaml/llvm/llvm*.cmx
1006 %{_libdir}/ocaml/llvm/llvm*.cmxa
1007 %{_libdir}/ocaml/llvm/llvm*.mli
1010 %defattr(644,root,root,755)
1015 %defattr(644,root,root,755)
1016 %{_datadir}/opt-viewer
1018 %files -n vim-plugin-clang
1019 %defattr(644,root,root,755)
1020 %{_datadir}/clang/clang-format.py
1021 %{_datadir}/clang/clang-rename.py