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: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/llvm-%{version}.src.tar.xz
39 # Source0-md5: 9a3b63df01c52556f7afb5617934e79e
40 Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/cfe-%{version}.src.tar.xz
41 # Source1-md5: 28db72b57ca99307259773e4ac74a6d3
42 Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/compiler-rt-%{version}.src.tar.xz
43 # Source2-md5: c251e582862f9fcc880802f8f2920096
44 Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz
45 # Source3-md5: c2777536fe0d4151c6aa30773f51af20
46 Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/polly-%{version}.src.tar.xz
47 # Source4-md5: 1ef3f82d49d0fb00fa92ce6e1b095da1
48 Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/clang-tools-extra-%{version}.src.tar.xz
49 # Source5-md5: b7c55438f792a1d5698696100a8731e0
50 Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
51 # Source6-md5: ee4fe10c625bbc66b1055c5d33017daf
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: 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 %{?with_doc:BuildRequires: python3-recommonmark}
117 BuildRequires: swig-python >= 3.0.11
120 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
121 # private copy in polly/lib/External/isl
122 #BuildRequires: isl-devel >= 0.18
123 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
126 BuildConflicts: llvm-ocaml
128 Requires: %{name}-libs = %{version}-%{release}
129 # LLVM is not supported on PPC64
130 # http://llvm.org/bugs/show_bug.cgi?id=3729
132 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
135 %define _sysconfdir /etc/%{name}
137 %define specflags_ppc -fno-var-tracking-assignments
138 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
139 # use -gsplit-dwarf only when building packages with debuginfo
140 # to avoid excessive disk space usage
141 %if 0%{?_enable_debug_packages}
142 %define specflags -gsplit-dwarf
145 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
146 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
148 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
149 # -Werror=format-security is for swig
150 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
151 %define filterout_c -fvar-tracking-assignments
152 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
153 %define filterout_ccpp -fvar-tracking-assignments
156 LLVM is a compiler infrastructure designed for compile-time,
157 link-time, runtime, and idle-time optimization of programs from
158 arbitrary programming languages. LLVM is written in C++ and has been
159 developed since 2000 at the University of Illinois and Apple. It
160 currently supports compilation of C and C++ programs using clang
163 %description -l pl.UTF-8
164 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
165 czasu kompilowania, linkowania, działania i bezczynności programów w
166 dowolnych językach programowania. Jest napisana w C++, rozwijana od
167 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
168 kompilację programów w C i C++ przy użyciu frontendu clang.
171 Summary: LLVM shared libraries
172 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
174 Conflicts: llvm < 3.2
177 LLVM shared libraries.
179 %description libs -l pl.UTF-8
180 Biblioteki współdzielone LLVM-a.
183 Summary: Static libraries and header files for LLVM
184 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
185 Group: Development/Languages
186 Requires: %{name}-libs = %{version}-%{release}
187 Requires: libstdc++-devel >= 6:3.4
190 This package contains static libraries and header files needed to
191 develop new native programs that use the LLVM infrastructure.
193 %description devel -l pl.UTF-8
194 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
195 potrzebne do tworzenia nowych programów natywnych wykorzystujących
199 Summary: Documentation for LLVM
200 Summary(pl.UTF-8): Dokumentacja do LLVM-a
202 # does not require base
205 Documentation for the LLVM compiler infrastructure.
207 %description doc -l pl.UTF-8
208 Dokumentacja do infrastruktury kompilatorów LLVM.
211 Summary: API documentation for LLVM
212 Summary(pl.UTF-8): Dokumentacja API LLVM-a
213 Group: Development/Languages
214 Requires: %{name}-doc = %{version}-%{release}
217 API documentation for the LLVM compiler infrastructure.
219 %description apidocs -l pl.UTF-8
220 Dokumentacja API infrastruktury kompilatorów LLVM.
223 Summary: Polyhedral optimizations for LLVM
224 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
225 Group: Development/Tools
226 URL: http://polly.llvm.org/
227 Requires: %{name} = %{version}-%{release}
230 Polly is a high-level loop and data-locality optimizer and
231 optimization infrastructure for LLVM. It uses an abstract mathematical
232 representation based on integer polyhedra to analyze and optimize the
233 memory access pattern of a program.
235 %description polly -l pl.UTF-8
236 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
237 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
238 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
239 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
242 Summary: Header files for LLVM Polly optimization infrastructure
243 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
244 Group: Development/Libraries
245 URL: http://polly.llvm.org/
246 Requires: %{name}-devel = %{version}-%{release}
247 Requires: %{name}-polly = %{version}-%{release}
249 %description polly-devel
250 Header files for LLVM Polly optimization infrastructure.
252 %description polly-devel -l pl.UTF-8
253 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
256 Summary: A C language family frontend for LLVM
257 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
259 Group: Development/Languages
260 Requires: %{name} = %{version}-%{release}
261 Requires: clang-libs = %{version}-%{release}
263 %description -n clang
264 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
265 of a crane or goose. 3. C-language family front-end toolkit.
267 The goal of the Clang project is to create a new C, C++, Objective C
268 and Objective C++ front-end for the LLVM compiler. Its tools are built
269 as libraries and designed to be loosely-coupled and extendable.
271 %description -n clang -l pl.UTF-8
272 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
273 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
276 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
277 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
278 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
281 %package -n clang-libs
282 Summary: Clang shared libraries
283 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
286 %description -n clang-libs
287 Clang shared libraries.
289 %description -n clang-libs -l pl.UTF-8
290 Biblioteki współdzielone Clanga.
292 %package -n clang-multilib
293 Summary: A C language family frontend for LLVM - 32-bit support
294 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
296 Group: Development/Languages
297 Requires: clang = %{version}-%{release}
299 %description -n clang-multilib
300 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
301 of a crane or goose. 3. C-language family front-end toolkit.
303 The goal of the Clang project is to create a new C, C++, Objective C
304 and Objective C++ front-end for the LLVM compiler. Its tools are built
305 as libraries and designed to be loosely-coupled and extendable.
307 This package contains the C compiler support for producing 32-bit
308 programs on 64-bit host.
310 %description -n clang-multilib -l pl.UTF-8
311 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
312 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
315 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
316 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
317 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
320 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
321 programów 32-bitowych na maszynie 64-bitowej.
323 %package -n clang-analyzer
324 Summary: A source code analysis framework
325 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
327 Group: Development/Languages
328 Requires: clang = %{version}-%{release}
329 # not picked up automatically since files are currently not instaled
330 # in standard Python hierarchies yet
333 %description -n clang-analyzer
334 The Clang Static Analyzer consists of both a source code analysis
335 framework and a standalone tool that finds bugs in C and Objective-C
336 programs. The standalone tool is invoked from the command-line, and is
337 intended to run in tandem with a build of a project or code base.
339 %description -n clang-analyzer -l pl.UTF-8
340 Clang Static Analyzer składa się ze szkieletu do analizy kodu
341 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
342 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
343 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
345 %package -n clang-devel
346 Summary: Header files for Clang
347 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
348 Group: Development/Languages
349 Requires: %{name}-devel = %{version}-%{release}
350 Requires: clang = %{version}-%{release}
352 %description -n clang-devel
353 This package contains header files for the Clang compiler.
355 %description -n clang-devel -l pl.UTF-8
356 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
358 %package -n clang-doc
359 Summary: Documentation for Clang
360 Summary(pl.UTF-8): Dokumentacja do Clanga
362 Requires: %{name} = %{version}-%{release}
364 %description -n clang-doc
365 Documentation for the Clang compiler front-end.
367 %description -n clang-doc -l pl.UTF-8
368 Dokumentacja do frontendu kompilatora Clang.
370 %package -n clang-apidocs
371 Summary: API documentation for Clang
372 Summary(pl.UTF-8): Dokumentacja API Clanga
373 Group: Development/Languages
374 Requires: clang-doc = %{version}-%{release}
376 %description -n clang-apidocs
377 API documentation for the Clang compiler.
379 %description -n clang-apidocs -l pl.UTF-8
380 Dokumentacja API kompilatora Clang.
382 %package -n clang-tools-extra
383 Summary: Extra tools for Clang
384 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
385 Group: Development/Tools
386 URL: http://clang.llvm.org/docs/ClangTools.html
387 Requires: clang = %{version}-%{release}
389 %description -n clang-tools-extra
390 Extra tools for Clang.
392 %description -n clang-tools-extra -l pl.UTF-8
393 Dodatkowe narzędzia do kompilatora Clang.
396 Summary: The LLVM linker
397 Summary(pl.UTF-8): Konsolidator z projektu LLVM
398 Group: Development/Libraries
399 URL: http://lld.llvm.org/
400 Requires: %{name} = %{version}-%{release}
403 lld is a new set of modular code for creating linker tools.
405 %description -n lld -l pl.UTF-8
406 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
409 %package -n lld-devel
410 Summary: Development files for LLD linker tools
411 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
412 Group: Development/Tools
413 URL: http://lld.llvm.org/
414 Requires: %{name}-devel = %{version}-%{release}
416 %description -n lld-devel
417 Development files for LLD linker tools.
419 %description -n lld-devel -l pl.UTF-8
420 Pliki programistyczne narzędzi konsolidujących LLD.
423 Summary: Next generation high-performance debugger
424 Summary(pl.UTF-8): Wydajny debugger nowej generacji
425 Group: Development/Debuggers
426 URL: http://lldb.llvm.org/
427 Requires: %{name} = %{version}-%{release}
431 LLDB is a next generation, high-performance debugger. It is built as a
432 set of reusable components which highly leverage existing libraries in
433 the larger LLVM Project, such as the Clang expression parser and LLVM
436 %description -n lldb -l pl.UTF-8
437 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
438 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
439 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
442 %package -n lldb-devel
443 Summary: Development files for LLDB debugger
444 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
445 Group: Development/Libraries
446 URL: http://lldb.llvm.org/
447 Requires: %{name}-devel = %{version}-%{release}
448 Requires: clang-devel = %{version}-%{release}
449 Requires: lldb = %{version}-%{release}
451 %description -n lldb-devel
452 Development files for LLDB debugger.
454 %description -n lldb-devel -l pl.UTF-8
455 Pliki programistyczne debuggera LLDB.
458 Summary: OCaml binding for LLVM
459 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
461 Requires: %{name} = %{version}-%{release}
463 %requires_eq ocaml-runtime
467 OCaml binding for LLVM.
469 %description ocaml -l pl.UTF-8
470 Wiązanie OCamla do LLVM-a.
473 Summary: Development files for LLVM OCaml binding
474 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
475 Group: Development/Libraries
476 Requires: %{name}-devel = %{version}-%{release}
477 Requires: %{name}-ocaml = %{version}-%{release}
479 %description ocaml-devel
480 The llvm-ocaml-devel package contains libraries and signature files
481 for developing applications that use llvm-ocaml binding.
483 %description ocaml-devel -l pl.UTF-8
484 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
485 wykorzystujących wiązanie llvm-ocaml.
488 Summary: Documentation for LLVM's OCaml binding
489 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
491 Requires: %{name}-ocaml = %{version}-%{release}
493 %description ocaml-doc
494 HTML documentation for LLVM's OCaml binding.
496 %description ocaml-doc -l pl.UTF-8
497 Dokumentacja HTML wiązania OCamla do LLVM-a.
500 Summary: Optimization records visualization tools
501 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
502 Group: Development/Tools
503 Requires: %{name} = %{version}
506 %description opt-viewer
507 Optimization records visualization tools.
509 %description opt-viewer -l pl.UTF-8
510 Narzędzia do wizualizacji rekordów optymalizacji.
512 %package -n vim-plugin-clang
513 Summary: Clang format and rename integration for Vim
514 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
515 Group: Applications/Editors/Vim
516 Requires: vim-rt >= 4:7.0
519 %description -n vim-plugin-clang
520 Clang format and rename integration for Vim.
522 %description -n vim-plugin-clang -l pl.UTF-8
523 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
526 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
527 %{__mv} cfe-%{version}.src tools/clang
528 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
529 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
530 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
531 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
532 %{__mv} lld-%{version}.src tools/lld
539 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
540 s,^#!.*bin/env python,#!%{__python},
541 s,^#!.*bin/env perl,#!%{__perl},
544 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
545 s,^#!.*bin/python.*,#!%{__python},
551 # Disabling assertions now, rec. by pure and needed for OpenGTL
552 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
554 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
557 %if "%{_lib}" == "lib64"
558 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
560 %if "%{_lib}" == "libx32"
561 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
564 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
567 -DLLVM_ENABLE_SPHINX:BOOL=ON \
568 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
570 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
571 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
572 -DLLVM_ENABLE_RTTI:BOOL=ON \
573 -DLLVM_ENABLE_PIC:BOOL=ON \
574 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
575 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
576 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
577 -DBUILD_SHARED_LIBS:BOOL=OFF \
578 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
579 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
584 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
587 %{__make} check 2>&1 | tee llvm-testlog.txt
588 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
592 %{__make} -C docs docs-llvm-html
593 %{__make} -C docs docs-llvm-man
595 %{__make} -C docs ocaml_doc
597 %{__make} -C tools/clang/docs docs-clang-html
598 %{__make} -C tools/clang/docs docs-clang-man
599 %{__make} -C tools/lld/docs docs-lld-html
601 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
602 -C tools/lldb/docs lldb-python-doc
603 %{__make} -C tools/lldb/docs lldb-cpp-doc
607 rm -rf $RPM_BUILD_ROOT
609 %{__make} -j1 -C build install \
610 DESTDIR=$RPM_BUILD_ROOT
612 # only some .pyc files are created by make install
613 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
614 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
616 # Adjust static analyzer installation
617 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
618 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
619 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
620 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
621 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
622 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
623 %py_postclean %{_datadir}/scan-view
625 # not installed by cmake buildsystem
626 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
629 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
630 # these tools are not installed
631 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
633 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
636 # Move documentation back to build directory
639 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
642 # and separate the apidoc
645 cp -a build/tools/clang/docs/html clang-apidoc
648 # And prepare Clang documentation
650 install -d clang-docs
651 for f in LICENSE.TXT NOTES.txt README.txt; do
652 ln tools/clang/$f clang-docs
655 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
657 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
659 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
660 # it seems it is used internally by an extra clang tool
661 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
663 # disable completeness check incompatible with split packaging
664 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
667 rm -rf $RPM_BUILD_ROOT
669 %post libs -p /sbin/ldconfig
670 %postun libs -p /sbin/ldconfig
672 %post -n clang-libs -p /sbin/ldconfig
673 %postun -n clang-libs -p /sbin/ldconfig
675 %post -n lldb -p /sbin/ldconfig
676 %postun -n lldb -p /sbin/ldconfig
679 %defattr(644,root,root,755)
680 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
681 %attr(755,root,root) %{_bindir}/bugpoint
682 %attr(755,root,root) %{_bindir}/dsymutil
683 %attr(755,root,root) %{_bindir}/llc
684 %attr(755,root,root) %{_bindir}/lli
685 %attr(755,root,root) %{_bindir}/llvm-ar
686 %attr(755,root,root) %{_bindir}/llvm-as
687 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
688 %attr(755,root,root) %{_bindir}/llvm-cat
689 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
690 %attr(755,root,root) %{_bindir}/llvm-cov
691 %attr(755,root,root) %{_bindir}/llvm-cvtres
692 %attr(755,root,root) %{_bindir}/llvm-cxxdump
693 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
694 %attr(755,root,root) %{_bindir}/llvm-cxxmap
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-dwarfdump
699 %attr(755,root,root) %{_bindir}/llvm-dwp
700 %attr(755,root,root) %{_bindir}/llvm-elfabi
701 %attr(755,root,root) %{_bindir}/llvm-exegesis
702 %attr(755,root,root) %{_bindir}/llvm-extract
703 %attr(755,root,root) %{_bindir}/llvm-lib
704 %attr(755,root,root) %{_bindir}/llvm-link
705 %attr(755,root,root) %{_bindir}/llvm-lto
706 %attr(755,root,root) %{_bindir}/llvm-lto2
707 %attr(755,root,root) %{_bindir}/llvm-mc
708 %attr(755,root,root) %{_bindir}/llvm-mca
709 %attr(755,root,root) %{_bindir}/llvm-modextract
710 %attr(755,root,root) %{_bindir}/llvm-mt
711 %attr(755,root,root) %{_bindir}/llvm-nm
712 %attr(755,root,root) %{_bindir}/llvm-objcopy
713 %attr(755,root,root) %{_bindir}/llvm-objdump
714 %attr(755,root,root) %{_bindir}/llvm-opt-report
715 %attr(755,root,root) %{_bindir}/llvm-pdbutil
716 %attr(755,root,root) %{_bindir}/llvm-profdata
717 %attr(755,root,root) %{_bindir}/llvm-ranlib
718 %attr(755,root,root) %{_bindir}/llvm-rc
719 %attr(755,root,root) %{_bindir}/llvm-readelf
720 %attr(755,root,root) %{_bindir}/llvm-readobj
721 %attr(755,root,root) %{_bindir}/llvm-rtdyld
722 %attr(755,root,root) %{_bindir}/llvm-size
723 %attr(755,root,root) %{_bindir}/llvm-split
724 %attr(755,root,root) %{_bindir}/llvm-strip
725 %attr(755,root,root) %{_bindir}/llvm-stress
726 %attr(755,root,root) %{_bindir}/llvm-strings
727 %attr(755,root,root) %{_bindir}/llvm-symbolizer
728 %attr(755,root,root) %{_bindir}/llvm-tblgen
729 %attr(755,root,root) %{_bindir}/llvm-undname
730 %attr(755,root,root) %{_bindir}/llvm-xray
731 %attr(755,root,root) %{_bindir}/obj2yaml
732 %attr(755,root,root) %{_bindir}/opt
733 %attr(755,root,root) %{_bindir}/sancov
734 %attr(755,root,root) %{_bindir}/sanstats
735 %attr(755,root,root) %{_bindir}/verify-uselistorder
736 %attr(755,root,root) %{_bindir}/yaml2obj
738 %{_mandir}/man1/bugpoint.1*
739 %{_mandir}/man1/dsymutil.1*
740 %{_mandir}/man1/lit.1*
741 %{_mandir}/man1/llc.1*
742 %{_mandir}/man1/lli.1*
743 %{_mandir}/man1/llvm-ar.1*
744 %{_mandir}/man1/llvm-as.1*
745 %{_mandir}/man1/llvm-bcanalyzer.1*
746 %{_mandir}/man1/llvm-cov.1*
747 %{_mandir}/man1/llvm-cxxmap.1*
748 %{_mandir}/man1/llvm-diff.1*
749 %{_mandir}/man1/llvm-dis.1*
750 %{_mandir}/man1/llvm-dwarfdump.1*
751 %{_mandir}/man1/llvm-exegesis.1*
752 %{_mandir}/man1/llvm-extract.1*
753 %{_mandir}/man1/llvm-lib.1*
754 %{_mandir}/man1/llvm-link.1*
755 %{_mandir}/man1/llvm-mca.1*
756 %{_mandir}/man1/llvm-nm.1*
757 %{_mandir}/man1/llvm-objdump.1*
758 %{_mandir}/man1/llvm-pdbutil.1*
759 %{_mandir}/man1/llvm-profdata.1*
760 %{_mandir}/man1/llvm-ranlib.1*
761 %{_mandir}/man1/llvm-readobj.1*
762 %{_mandir}/man1/llvm-stress.1*
763 %{_mandir}/man1/llvm-symbolizer.1*
764 %{_mandir}/man1/opt.1*
765 %{_mandir}/man1/tblgen.1*
769 %defattr(644,root,root,755)
770 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
772 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
773 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.8
774 %attr(755,root,root) %{_libdir}/LLVMgold.so
775 %attr(755,root,root) %{_libdir}/libOptRemarks.so.8
778 %defattr(644,root,root,755)
779 %attr(755,root,root) %{_bindir}/llvm-config
780 %attr(755,root,root) %{_libdir}/libLLVM.so
781 %attr(755,root,root) %{_libdir}/libLTO.so
782 %attr(755,root,root) %{_libdir}/libOptRemarks.so
783 %{_libdir}/libLLVM*.a
785 %{_includedir}/llvm-c
786 %{_libdir}/cmake/llvm
788 %{_mandir}/man1/llvm-config.1*
792 #%defattr(644,root,root,755)
796 %defattr(644,root,root,755)
802 %defattr(644,root,root,755)
803 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
804 %attr(755,root,root) %{_libdir}/LLVMPolly.so
807 %defattr(644,root,root,755)
808 %{_libdir}/libPolly.a
809 %{_libdir}/libPollyISL.a
810 %{_libdir}/libPollyPPCG.a
812 %{_libdir}/cmake/polly
816 %defattr(644,root,root,755)
817 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
818 %attr(755,root,root) %{_bindir}/clang
819 %attr(755,root,root) %{_bindir}/clang++
820 %attr(755,root,root) %{_bindir}/clang-%{abi}
821 %attr(755,root,root) %{_bindir}/clang-check
822 %attr(755,root,root) %{_bindir}/clang-cl
823 %attr(755,root,root) %{_bindir}/clang-cpp
824 %attr(755,root,root) %{_bindir}/clang-format
825 %attr(755,root,root) %{_bindir}/clang-import-test
826 %attr(755,root,root) %{_bindir}/clang-offload-bundler
827 %attr(755,root,root) %{_bindir}/git-clang-format
828 %dir %{_libdir}/clang
829 %dir %{_libdir}/clang/%{version}
830 %{_libdir}/clang/%{version}/include
832 %ifarch %{ix86} %{x8664}
833 %dir %{_libdir}/clang/%{version}/lib
834 %dir %{_libdir}/clang/%{version}/lib/linux
835 %dir %{_libdir}/clang/%{version}/share
839 %dir %{_libdir}/clang/%{version}/lib
840 %dir %{_libdir}/clang/%{version}/lib/linux
841 %dir %{_libdir}/clang/%{version}/share
845 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
846 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
849 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
850 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
851 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
853 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
854 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
856 %ifarch %{ix86} %{x8664} mips64
857 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
859 %ifarch %{x8664} aarch64 mips64
860 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
861 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
863 %ifarch %{x8664} aarch64
864 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
868 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
869 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
870 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
871 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
872 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
876 %dir %{_datadir}/clang
877 %{_datadir}/clang/clang-format-diff.py
880 %defattr(644,root,root,755)
881 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
883 %if %{with rt} && %{with multilib}
885 %files -n clang-multilib
886 %defattr(644,root,root,755)
887 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
888 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
891 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
892 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
893 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
897 %files -n clang-analyzer
898 %defattr(644,root,root,755)
899 %attr(755,root,root) %{_bindir}/scan-build
900 %attr(755,root,root) %{_bindir}/scan-view
901 %{_datadir}/scan-build
902 %{_datadir}/scan-view
903 %{_mandir}/man1/scan-build.1*
904 %dir %{_libdir}/scan-build
905 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
906 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
908 %files -n clang-devel
909 %defattr(644,root,root,755)
910 %attr(755,root,root) %{_libdir}/libclang.so
911 %{_libdir}/libclang*.a
913 %{_includedir}/clang-c
914 %{_libdir}/cmake/clang
917 %defattr(644,root,root,755)
918 %doc tools/clang/docs/*.{html,png,txt}
921 %files -n clang-apidocs
922 %defattr(644,root,root,755)
926 %files -n clang-tools-extra
927 %defattr(644,root,root,755)
928 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
929 %attr(755,root,root) %{_bindir}/clang-apply-replacements
930 %attr(755,root,root) %{_bindir}/clang-change-namespace
931 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
932 %attr(755,root,root) %{_bindir}/clang-include-fixer
933 %attr(755,root,root) %{_bindir}/clang-query
934 %attr(755,root,root) %{_bindir}/clang-refactor
935 %attr(755,root,root) %{_bindir}/clang-rename
936 %attr(755,root,root) %{_bindir}/clang-reorder-fields
937 %attr(755,root,root) %{_bindir}/clang-tidy
938 %attr(755,root,root) %{_bindir}/clangd
939 %attr(755,root,root) %{_bindir}/diagtool
940 %attr(755,root,root) %{_bindir}/find-all-symbols
941 %attr(755,root,root) %{_bindir}/hmaptool
942 %attr(755,root,root) %{_bindir}/modularize
943 %attr(755,root,root) %{_bindir}/pp-trace
944 %{_datadir}/clang/clang-include-fixer.py
945 %{_datadir}/clang/clang-tidy-diff.py
946 %{_datadir}/clang/run-clang-tidy.py
947 %{_datadir}/clang/run-find-all-symbols.py
950 %defattr(644,root,root,755)
951 %doc tools/lld/{LICENSE.TXT,README.md}
952 %attr(755,root,root) %{_bindir}/ld.lld
953 %attr(755,root,root) %{_bindir}/ld64.lld
954 %attr(755,root,root) %{_bindir}/lld
955 %attr(755,root,root) %{_bindir}/lld-link
956 %attr(755,root,root) %{_bindir}/wasm-ld
959 %defattr(644,root,root,755)
960 %{_libdir}/liblld[ACDEHMRWXY]*.a
965 %defattr(644,root,root,755)
966 %attr(755,root,root) %{_bindir}/lldb
967 %attr(755,root,root) %{_bindir}/lldb-argdumper
968 %attr(755,root,root) %{_bindir}/lldb-mi
969 %attr(755,root,root) %{_bindir}/lldb-server
970 %attr(755,root,root) %{_bindir}/lldb-test
971 %attr(755,root,root) %{_bindir}/lldb-vscode
972 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
973 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.8
974 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.8
975 %dir %{py_sitedir}/lldb
976 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
977 %{py_sitedir}/lldb/formatters
978 %{py_sitedir}/lldb/runtime
979 %{py_sitedir}/lldb/utils
980 %{py_sitedir}/lldb/__init__.py[co]
981 %{py_sitedir}/lldb/embedded_interpreter.py[co]
982 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
983 %attr(755,root,root) %{py_sitedir}/readline.so
986 %defattr(644,root,root,755)
987 %attr(755,root,root) %{_libdir}/liblldb.so
988 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
989 %{_libdir}/liblldb*.a
995 %defattr(644,root,root,755)
996 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
997 %dir %{_libdir}/ocaml/llvm
998 %{_libdir}/ocaml/llvm/llvm*.cma
999 %{_libdir}/ocaml/llvm/llvm*.cmi
1000 %{_libdir}/ocaml/META.llvm*
1003 %defattr(644,root,root,755)
1004 %{_libdir}/ocaml/llvm/libllvm*.a
1005 %{_libdir}/ocaml/llvm/llvm*.a
1006 %{_libdir}/ocaml/llvm/llvm*.cmx
1007 %{_libdir}/ocaml/llvm/llvm*.cmxa
1008 %{_libdir}/ocaml/llvm/llvm*.mli
1011 %defattr(644,root,root,755)
1016 %defattr(644,root,root,755)
1017 %{_datadir}/opt-viewer
1019 %files -n vim-plugin-clang
1020 %defattr(644,root,root,755)
1021 %{_datadir}/clang/clang-format.py
1022 %{_datadir}/clang/clang-rename.py