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 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: c88c98709300ce2c285391f387fecce0
40 Source1: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
41 # Source1-md5: 4e419bd4e3b55aa06d872320f754bd85
42 Source2: http://releases.llvm.org/%{version}/compiler-rt-%{version}.src.tar.xz
43 # Source2-md5: 99bf8bcb68ba96dda74f6aee6c55f639
44 Source3: http://releases.llvm.org/%{version}/lldb-%{version}.src.tar.xz
45 # Source3-md5: 482eba39e78c75a83216cf2d5b7a54b4
46 Source4: http://releases.llvm.org/%{version}/polly-%{version}.src.tar.xz
47 # Source4-md5: 4e5937753d1f77e2c0feca485fc7f9da
48 Source5: http://releases.llvm.org/%{version}/clang-tools-extra-%{version}.src.tar.xz
49 # Source5-md5: 431cba2b652e9c227a59a6d681388160
50 Source6: http://releases.llvm.org/%{version}/lld-%{version}.src.tar.xz
51 # Source6-md5: 31cc580b32be124972c40c19c0839fed
52 Patch1: %{name}-pld.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: glibc-devel(x86_64)
70 BuildRequires: libedit-devel
71 BuildRequires: libltdl-devel
72 BuildRequires: libstdc++-devel >= 5:3.4
73 BuildRequires: ncurses-devel
75 BuildRequires: ocaml >= 4.00.0
76 BuildRequires: ocaml-ctypes-devel >= 0.4
77 BuildRequires: ocaml-findlib
78 BuildRequires: ocaml-ocamldoc
79 BuildRequires: ocaml-ounit >= 2
81 BuildRequires: perl-base >= 1:5.6
82 BuildRequires: perl-tools-pod
83 BuildRequires: python >= 1:2.7
84 BuildRequires: rpm-pythonprov
85 BuildRequires: rpmbuild(macros) >= 1.734
86 %{?with_doc:BuildRequires: sphinx-pdg}
87 BuildRequires: tar >= 1:1.22
89 BuildRequires: zlib-devel
91 BuildRequires: doxygen
92 BuildRequires: graphviz
95 BuildRequires: dejagnu
96 BuildRequires: tcl-devel
98 %if %{with rt} && %{with multilib}
100 BuildRequires: gcc-c++-multilib-32
101 BuildRequires: libstdc++-multilib-32-devel
104 BuildRequires: gcc-c++-multilib-32
105 BuildRequires: libstdc++-multilib-32-devel
106 BuildRequires: gcc-c++-multilib-64
107 BuildRequires: libstdc++-multilib-64-devel
111 BuildRequires: epydoc
113 BuildRequires: libatomic-devel
115 BuildRequires: libxml2-devel >= 2
116 BuildRequires: ncurses-ext-devel
117 BuildRequires: python-devel >= 2
118 BuildRequires: swig-python >= 3.0.11
121 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
122 # private copy in polly/lib/External/isl
123 #BuildRequires: isl-devel >= 0.18
124 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
127 BuildConflicts: llvm-ocaml
129 Requires: %{name}-libs = %{version}-%{release}
130 # LLVM is not supported on PPC64
131 # http://llvm.org/bugs/show_bug.cgi?id=3729
133 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
136 %define _sysconfdir /etc/%{name}
138 %define specflags_ppc -fno-var-tracking-assignments
139 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
140 # use -gsplit-dwarf only when building packages with debuginfo
141 # to avoid excessive disk space usage
142 %if 0%{?_enable_debug_packages}
143 %define specflags_ia32 -gsplit-dwarf
144 %define specflags_x32 -gsplit-dwarf
147 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
148 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
150 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
151 # -Werror=format-security is for swig
152 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
153 %define filterout_c -fvar-tracking-assignments
154 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
155 %define filterout_ccpp -fvar-tracking-assignments
158 LLVM is a compiler infrastructure designed for compile-time,
159 link-time, runtime, and idle-time optimization of programs from
160 arbitrary programming languages. LLVM is written in C++ and has been
161 developed since 2000 at the University of Illinois and Apple. It
162 currently supports compilation of C and C++ programs using clang
165 %description -l pl.UTF-8
166 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
167 czasu kompilowania, linkowania, działania i bezczynności programów w
168 dowolnych językach programowania. Jest napisana w C++, rozwijana od
169 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
170 kompilację programów w C i C++ przy użyciu frontendu clang.
173 Summary: LLVM shared libraries
174 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
176 Conflicts: llvm < 3.2
179 LLVM shared libraries.
181 %description libs -l pl.UTF-8
182 Biblioteki współdzielone LLVM-a.
185 Summary: Static libraries and header files for LLVM
186 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
187 Group: Development/Languages
188 Requires: %{name}-libs = %{version}-%{release}
189 Requires: libstdc++-devel >= 6:3.4
192 This package contains static libraries and header files needed to
193 develop new native programs that use the LLVM infrastructure.
195 %description devel -l pl.UTF-8
196 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
197 potrzebne do tworzenia nowych programów natywnych wykorzystujących
201 Summary: Documentation for LLVM
202 Summary(pl.UTF-8): Dokumentacja do LLVM-a
204 # does not require base
207 Documentation for the LLVM compiler infrastructure.
209 %description doc -l pl.UTF-8
210 Dokumentacja do infrastruktury kompilatorów LLVM.
213 Summary: API documentation for LLVM
214 Summary(pl.UTF-8): Dokumentacja API LLVM-a
215 Group: Development/Languages
216 Requires: %{name}-doc = %{version}-%{release}
219 API documentation for the LLVM compiler infrastructure.
221 %description apidocs -l pl.UTF-8
222 Dokumentacja API infrastruktury kompilatorów LLVM.
225 Summary: Polyhedral optimizations for LLVM
226 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
227 Group: Development/Tools
228 URL: http://polly.llvm.org/
229 Requires: %{name} = %{version}-%{release}
232 Polly is a high-level loop and data-locality optimizer and
233 optimization infrastructure for LLVM. It uses an abstract mathematical
234 representation based on integer polyhedra to analyze and optimize the
235 memory access pattern of a program.
237 %description polly -l pl.UTF-8
238 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
239 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
240 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
241 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
244 Summary: Header files for LLVM Polly optimization infrastructure
245 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
246 Group: Development/Libraries
247 URL: http://polly.llvm.org/
248 Requires: %{name}-devel = %{version}-%{release}
249 Requires: %{name}-polly = %{version}-%{release}
251 %description polly-devel
252 Header files for LLVM Polly optimization infrastructure.
254 %description polly-devel -l pl.UTF-8
255 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
258 Summary: A C language family frontend for LLVM
259 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
261 Group: Development/Languages
262 Requires: %{name} = %{version}-%{release}
263 Requires: clang-libs = %{version}-%{release}
265 %description -n clang
266 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
267 of a crane or goose. 3. C-language family front-end toolkit.
269 The goal of the Clang project is to create a new C, C++, Objective C
270 and Objective C++ front-end for the LLVM compiler. Its tools are built
271 as libraries and designed to be loosely-coupled and extendable.
273 %description -n clang -l pl.UTF-8
274 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
275 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
278 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
279 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
280 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
283 %package -n clang-libs
284 Summary: Clang shared libraries
285 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
288 %description -n clang-libs
289 Clang shared libraries.
291 %description -n clang-libs -l pl.UTF-8
292 Biblioteki współdzielone Clanga.
294 %package -n clang-multilib
295 Summary: A C language family frontend for LLVM - 32-bit support
296 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
298 Group: Development/Languages
299 Requires: clang = %{version}-%{release}
301 %description -n clang-multilib
302 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
303 of a crane or goose. 3. C-language family front-end toolkit.
305 The goal of the Clang project is to create a new C, C++, Objective C
306 and Objective C++ front-end for the LLVM compiler. Its tools are built
307 as libraries and designed to be loosely-coupled and extendable.
309 This package contains the C compiler support for producing 32-bit
310 programs on 64-bit host.
312 %description -n clang-multilib -l pl.UTF-8
313 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
314 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
317 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
318 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
319 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
322 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
323 programów 32-bitowych na maszynie 64-bitowej.
325 %package -n clang-analyzer
326 Summary: A source code analysis framework
327 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
329 Group: Development/Languages
330 Requires: clang = %{version}-%{release}
331 # not picked up automatically since files are currently not instaled
332 # in standard Python hierarchies yet
335 %description -n clang-analyzer
336 The Clang Static Analyzer consists of both a source code analysis
337 framework and a standalone tool that finds bugs in C and Objective-C
338 programs. The standalone tool is invoked from the command-line, and is
339 intended to run in tandem with a build of a project or code base.
341 %description -n clang-analyzer -l pl.UTF-8
342 Clang Static Analyzer składa się ze szkieletu do analizy kodu
343 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
344 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
345 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
347 %package -n clang-devel
348 Summary: Header files for Clang
349 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
350 Group: Development/Languages
351 Requires: %{name}-devel = %{version}-%{release}
352 Requires: clang = %{version}-%{release}
354 %description -n clang-devel
355 This package contains header files for the Clang compiler.
357 %description -n clang-devel -l pl.UTF-8
358 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
360 %package -n clang-doc
361 Summary: Documentation for Clang
362 Summary(pl.UTF-8): Dokumentacja do Clanga
364 Requires: %{name} = %{version}-%{release}
366 %description -n clang-doc
367 Documentation for the Clang compiler front-end.
369 %description -n clang-doc -l pl.UTF-8
370 Dokumentacja do frontendu kompilatora Clang.
372 %package -n clang-apidocs
373 Summary: API documentation for Clang
374 Summary(pl.UTF-8): Dokumentacja API Clanga
375 Group: Development/Languages
376 Requires: clang-doc = %{version}-%{release}
378 %description -n clang-apidocs
379 API documentation for the Clang compiler.
381 %description -n clang-apidocs -l pl.UTF-8
382 Dokumentacja API kompilatora Clang.
384 %package -n clang-tools-extra
385 Summary: Extra tools for Clang
386 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
387 Group: Development/Tools
388 URL: http://clang.llvm.org/docs/ClangTools.html
389 Requires: clang = %{version}-%{release}
391 %description -n clang-tools-extra
392 Extra tools for Clang.
394 %description -n clang-tools-extra -l pl.UTF-8
395 Dodatkowe narzędzia do kompilatora Clang.
398 Summary: The LLVM linker
399 Summary(pl.UTF-8): Konsolidator z projektu LLVM
400 Group: Development/Libraries
401 URL: http://lld.llvm.org/
402 Requires: %{name} = %{version}-%{release}
405 lld is a new set of modular code for creating linker tools.
407 %description -n lld -l pl.UTF-8
408 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
411 %package -n lld-devel
412 Summary: Development files for LLD linker tools
413 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
414 Group: Development/Tools
415 URL: http://lld.llvm.org/
416 Requires: %{name}-devel = %{version}-%{release}
418 %description -n lld-devel
419 Development files for LLD linker tools.
421 %description -n lld-devel -l pl.UTF-8
422 Pliki programistyczne narzędzi konsolidujących LLD.
425 Summary: Next generation high-performance debugger
426 Summary(pl.UTF-8): Wydajny debugger nowej generacji
427 Group: Development/Debuggers
428 URL: http://lldb.llvm.org/
429 Requires: %{name} = %{version}-%{release}
433 LLDB is a next generation, high-performance debugger. It is built as a
434 set of reusable components which highly leverage existing libraries in
435 the larger LLVM Project, such as the Clang expression parser and LLVM
438 %description -n lldb -l pl.UTF-8
439 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
440 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
441 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
444 %package -n lldb-devel
445 Summary: Development files for LLDB debugger
446 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
447 Group: Development/Libraries
448 URL: http://lldb.llvm.org/
449 Requires: %{name}-devel = %{version}-%{release}
450 Requires: clang-devel = %{version}-%{release}
451 Requires: lldb = %{version}-%{release}
453 %description -n lldb-devel
454 Development files for LLDB debugger.
456 %description -n lldb-devel -l pl.UTF-8
457 Pliki programistyczne debuggera LLDB.
460 Summary: OCaml binding for LLVM
461 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
463 Requires: %{name} = %{version}-%{release}
465 %requires_eq ocaml-runtime
469 OCaml binding for LLVM.
471 %description ocaml -l pl.UTF-8
472 Wiązanie OCamla do LLVM-a.
475 Summary: Development files for LLVM OCaml binding
476 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
477 Group: Development/Libraries
478 Requires: %{name}-devel = %{version}-%{release}
479 Requires: %{name}-ocaml = %{version}-%{release}
481 %description ocaml-devel
482 The llvm-ocaml-devel package contains libraries and signature files
483 for developing applications that use llvm-ocaml binding.
485 %description ocaml-devel -l pl.UTF-8
486 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
487 wykorzystujących wiązanie llvm-ocaml.
490 Summary: Documentation for LLVM's OCaml binding
491 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
493 Requires: %{name}-ocaml = %{version}-%{release}
495 %description ocaml-doc
496 HTML documentation for LLVM's OCaml binding.
498 %description ocaml-doc -l pl.UTF-8
499 Dokumentacja HTML wiązania OCamla do LLVM-a.
502 Summary: Optimization records visualization tools
503 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
504 Group: Development/Tools
505 Requires: %{name} = %{version}
508 %description opt-viewer
509 Optimization records visualization tools.
511 %description opt-viewer -l pl.UTF-8
512 Narzędzia do wizualizacji rekordów optymalizacji.
514 %package -n vim-plugin-clang
515 Summary: Clang format and rename integration for Vim
516 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
517 Group: Applications/Editors/Vim
518 Requires: vim-rt >= 4:7.0
521 %description -n vim-plugin-clang
522 Clang format and rename integration for Vim.
524 %description -n vim-plugin-clang -l pl.UTF-8
525 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
528 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
529 %{__mv} cfe-%{version}.src tools/clang
530 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
531 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
532 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
533 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
534 %{__mv} lld-%{version}.src tools/lld
541 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
542 s,^#!.*bin/env python,#!%{__python},
543 s,^#!.*bin/env perl,#!%{__perl},
546 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
547 s,^#!.*bin/python.*,#!%{__python},
553 # Disabling assertions now, rec. by pure and needed for OpenGTL
554 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
556 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
559 %if "%{_lib}" == "lib64"
560 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
562 %if "%{_lib}" == "libx32"
563 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
566 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
569 -DLLVM_ENABLE_SPHINX:BOOL=ON \
570 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
572 -DLLVM_ENABLE_PIC:BOOL=ON \
573 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
574 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
575 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
576 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
577 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
578 -DBUILD_SHARED_LIBS:BOOL=OFF \
579 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
580 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
586 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
589 %{__make} check 2>&1 | tee llvm-testlog.txt
590 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
594 %{__make} -C docs docs-llvm-html
595 %{__make} -C docs docs-llvm-man
597 %{__make} -C docs ocaml_doc
599 %{__make} -C tools/clang/docs docs-clang-html
600 %{__make} -C tools/clang/docs docs-clang-man
601 %{__make} -C tools/lld/docs docs-lld-html
603 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
604 -C tools/lldb/docs lldb-python-doc
605 %{__make} -C tools/lldb/docs lldb-cpp-doc
609 rm -rf $RPM_BUILD_ROOT
611 %{__make} -j1 -C build install \
612 DESTDIR=$RPM_BUILD_ROOT
614 # only some .pyc files are created by make install
615 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
616 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
618 # Adjust static analyzer installation
619 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
620 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
621 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
622 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
623 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
624 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
625 %py_postclean %{_datadir}/scan-view
627 # not installed by cmake buildsystem
628 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
631 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
632 # these tools are not installed
633 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
635 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
638 # Move documentation back to build directory
641 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
644 # and separate the apidoc
647 cp -a build/tools/clang/docs/html clang-apidoc
650 # And prepare Clang documentation
652 install -d clang-docs
653 for f in LICENSE.TXT NOTES.txt README.txt; do
654 ln tools/clang/$f clang-docs
657 # Get rid of erroneously installed example files.
658 %{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
660 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
662 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
664 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
665 # it seems it is used internally by an extra clang tool
666 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
669 rm -rf $RPM_BUILD_ROOT
671 %post libs -p /sbin/ldconfig
672 %postun libs -p /sbin/ldconfig
674 %post -n clang-libs -p /sbin/ldconfig
675 %postun -n clang-libs -p /sbin/ldconfig
677 %post -n lldb -p /sbin/ldconfig
678 %postun -n lldb -p /sbin/ldconfig
681 %defattr(644,root,root,755)
682 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
683 %attr(755,root,root) %{_bindir}/bugpoint
684 %attr(755,root,root) %{_bindir}/llc
685 %attr(755,root,root) %{_bindir}/lli
686 %attr(755,root,root) %{_bindir}/llvm-ar
687 %attr(755,root,root) %{_bindir}/llvm-as
688 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
689 %attr(755,root,root) %{_bindir}/llvm-cat
690 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
691 %attr(755,root,root) %{_bindir}/llvm-cov
692 %attr(755,root,root) %{_bindir}/llvm-cvtres
693 %attr(755,root,root) %{_bindir}/llvm-cxxdump
694 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
695 %attr(755,root,root) %{_bindir}/llvm-diff
696 %attr(755,root,root) %{_bindir}/llvm-dis
697 %attr(755,root,root) %{_bindir}/llvm-dlltool
698 %attr(755,root,root) %{_bindir}/llvm-dsymutil
699 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
700 %attr(755,root,root) %{_bindir}/llvm-dwp
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-mcmarkup
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-stress
724 %attr(755,root,root) %{_bindir}/llvm-strings
725 %attr(755,root,root) %{_bindir}/llvm-symbolizer
726 %attr(755,root,root) %{_bindir}/llvm-tblgen
727 %attr(755,root,root) %{_bindir}/llvm-xray
728 %attr(755,root,root) %{_bindir}/obj2yaml
729 %attr(755,root,root) %{_bindir}/opt
730 %attr(755,root,root) %{_bindir}/sancov
731 %attr(755,root,root) %{_bindir}/sanstats
732 %attr(755,root,root) %{_bindir}/verify-uselistorder
733 %attr(755,root,root) %{_bindir}/yaml2obj
735 %{_mandir}/man1/bugpoint.1*
736 %{_mandir}/man1/dsymutil.1*
737 %{_mandir}/man1/lit.1*
738 %{_mandir}/man1/llc.1*
739 %{_mandir}/man1/lli.1*
740 %{_mandir}/man1/llvm-ar.1*
741 %{_mandir}/man1/llvm-as.1*
742 %{_mandir}/man1/llvm-bcanalyzer.1*
743 %{_mandir}/man1/llvm-cov.1*
744 %{_mandir}/man1/llvm-diff.1*
745 %{_mandir}/man1/llvm-dis.1*
746 %{_mandir}/man1/llvm-dwarfdump.1*
747 %{_mandir}/man1/llvm-extract.1*
748 %{_mandir}/man1/llvm-lib.1*
749 %{_mandir}/man1/llvm-link.1*
750 %{_mandir}/man1/llvm-nm.1*
751 %{_mandir}/man1/llvm-pdbutil.1*
752 %{_mandir}/man1/llvm-profdata.1*
753 %{_mandir}/man1/llvm-ranlib.1*
754 %{_mandir}/man1/llvm-readobj.1*
755 %{_mandir}/man1/llvm-stress.1*
756 %{_mandir}/man1/llvm-symbolizer.1*
757 %{_mandir}/man1/opt.1*
758 %{_mandir}/man1/tblgen.1*
762 %defattr(644,root,root,755)
763 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
765 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
766 %attr(755,root,root) %{_libdir}/libLTO.so.%{version}
767 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.6
768 %attr(755,root,root) %{_libdir}/LLVMgold.so
771 %defattr(644,root,root,755)
772 %attr(755,root,root) %{_bindir}/llvm-config
773 %attr(755,root,root) %{_libdir}/libLLVM.so
774 %attr(755,root,root) %{_libdir}/libLTO.so
775 %attr(755,root,root) %{_libdir}/BugpointPasses.so
776 %{_libdir}/libLLVM*.a
778 %{_includedir}/llvm-c
779 %{_libdir}/cmake/llvm
781 %{_mandir}/man1/llvm-config.1*
785 #%defattr(644,root,root,755)
789 %defattr(644,root,root,755)
795 %defattr(644,root,root,755)
796 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
797 %attr(755,root,root) %{_libdir}/LLVMPolly.so
800 %defattr(644,root,root,755)
801 %{_libdir}/libPolly.a
802 %{_libdir}/libPollyISL.a
803 %{_libdir}/libPollyPPCG.a
805 %{_libdir}/cmake/polly
809 %defattr(644,root,root,755)
810 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
811 %attr(755,root,root) %{_bindir}/clang
812 %attr(755,root,root) %{_bindir}/clang++
813 %attr(755,root,root) %{_bindir}/clang-%{abi}
814 %attr(755,root,root) %{_bindir}/clang-check
815 %attr(755,root,root) %{_bindir}/clang-cl
816 %attr(755,root,root) %{_bindir}/clang-cpp
817 %attr(755,root,root) %{_bindir}/clang-format
818 %attr(755,root,root) %{_bindir}/clang-import-test
819 %attr(755,root,root) %{_bindir}/clang-offload-bundler
820 %attr(755,root,root) %{_bindir}/git-clang-format
821 %dir %{_libdir}/clang
822 %dir %{_libdir}/clang/%{version}
823 %{_libdir}/clang/%{version}/include
825 %ifarch %{ix86} %{x8664} x32
826 %dir %{_libdir}/clang/%{version}/lib
827 %dir %{_libdir}/clang/%{version}/lib/linux
830 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
831 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
834 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
835 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
836 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
838 %ifarch %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 ppc64
839 %{_libdir}/clang/%{version}/asan_blacklist.txt
841 %ifarch %{ix86} %{x8664} x32 mips64
842 %{_libdir}/clang/%{version}/cfi_blacklist.txt
844 %ifarch %{x8664} x32 aarch64 mips64
845 %{_libdir}/clang/%{version}/dfsan_abilist.txt
846 %{_libdir}/clang/%{version}/msan_blacklist.txt
849 %dir %{_datadir}/clang
850 %{_datadir}/clang/clang-format-diff.py
853 %defattr(644,root,root,755)
854 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
855 %attr(755,root,root) %ghost %{_libdir}/libclang.so.6
857 %if %{with rt} && %{with multilib}
859 %files -n clang-multilib
860 %defattr(644,root,root,755)
861 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
862 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
865 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
866 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
867 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
871 %files -n clang-analyzer
872 %defattr(644,root,root,755)
873 %attr(755,root,root) %{_bindir}/scan-build
874 %attr(755,root,root) %{_bindir}/scan-view
875 %{_datadir}/scan-build
876 %{_datadir}/scan-view
877 %{_mandir}/man1/scan-build.1*
878 %dir %{_libdir}/scan-build
879 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
880 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
882 %files -n clang-devel
883 %defattr(644,root,root,755)
884 %attr(755,root,root) %{_libdir}/libclang.so
885 %{_libdir}/libclang*.a
887 %{_includedir}/clang-c
888 %{_libdir}/cmake/clang
891 %defattr(644,root,root,755)
892 %doc tools/clang/docs/*.{html,png,txt}
895 %files -n clang-apidocs
896 %defattr(644,root,root,755)
900 %files -n clang-tools-extra
901 %defattr(644,root,root,755)
902 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
903 %attr(755,root,root) %{_bindir}/clang-apply-replacements
904 %attr(755,root,root) %{_bindir}/clang-change-namespace
905 %attr(755,root,root) %{_bindir}/clang-func-mapping
906 %attr(755,root,root) %{_bindir}/clang-include-fixer
907 %attr(755,root,root) %{_bindir}/clang-query
908 %attr(755,root,root) %{_bindir}/clang-refactor
909 %attr(755,root,root) %{_bindir}/clang-rename
910 %attr(755,root,root) %{_bindir}/clang-reorder-fields
911 %attr(755,root,root) %{_bindir}/clang-tidy
912 %attr(755,root,root) %{_bindir}/clangd
913 %attr(755,root,root) %{_bindir}/find-all-symbols
914 %attr(755,root,root) %{_bindir}/modularize
915 %attr(755,root,root) %{_bindir}/pp-trace
916 %{_datadir}/clang/clang-include-fixer.py
917 %{_datadir}/clang/clang-tidy-diff.py
918 %{_datadir}/clang/run-clang-tidy.py
919 %{_datadir}/clang/run-find-all-symbols.py
922 %defattr(644,root,root,755)
923 %doc tools/lld/{LICENSE.TXT,README.md}
924 %attr(755,root,root) %{_bindir}/ld.lld
925 %attr(755,root,root) %{_bindir}/ld64.lld
926 %attr(755,root,root) %{_bindir}/lld
927 %attr(755,root,root) %{_bindir}/lld-link
928 %attr(755,root,root) %{_bindir}/wasm-ld
931 %defattr(644,root,root,755)
932 %{_libdir}/liblld[ACDEHMRWXY]*.a
937 %defattr(644,root,root,755)
938 %attr(755,root,root) %{_bindir}/lldb
939 %attr(755,root,root) %{_bindir}/lldb-argdumper
940 %attr(755,root,root) %{_bindir}/lldb-mi
941 %attr(755,root,root) %{_bindir}/lldb-server
942 %attr(755,root,root) %{_bindir}/lldb-test
943 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
944 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.6
945 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so.%{version}
946 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.6
947 %dir %{py_sitedir}/lldb
948 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
949 %{py_sitedir}/lldb/formatters
950 %{py_sitedir}/lldb/runtime
951 %{py_sitedir}/lldb/utils
952 %{py_sitedir}/lldb/__init__.py[co]
953 %{py_sitedir}/lldb/embedded_interpreter.py[co]
954 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
955 %attr(755,root,root) %{py_sitedir}/readline.so
958 %defattr(644,root,root,755)
959 %attr(755,root,root) %{_libdir}/liblldb.so
960 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
961 %{_libdir}/liblldb*.a
967 %defattr(644,root,root,755)
968 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
969 %dir %{_libdir}/ocaml/llvm
970 %{_libdir}/ocaml/llvm/llvm*.cma
971 %{_libdir}/ocaml/llvm/llvm*.cmi
972 %{_libdir}/ocaml/META.llvm*
975 %defattr(644,root,root,755)
976 %{_libdir}/ocaml/llvm/libllvm*.a
977 %{_libdir}/ocaml/llvm/llvm*.a
978 %{_libdir}/ocaml/llvm/llvm*.cmx
979 %{_libdir}/ocaml/llvm/llvm*.cmxa
980 %{_libdir}/ocaml/llvm/llvm*.mli
983 %defattr(644,root,root,755)
988 %defattr(644,root,root,755)
989 %{_datadir}/opt-viewer
991 %files -n vim-plugin-clang
992 %defattr(644,root,root,755)
993 %{_datadir}/clang/clang-format.py
994 %{_datadir}/clang/clang-rename.py