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: e0140354db83cdeb8668531b431398f0
40 Source1: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
41 # Source1-md5: 2ac5d8d78be681e31611c5e546e11174
42 Source2: http://releases.llvm.org/%{version}/compiler-rt-%{version}.src.tar.xz
43 # Source2-md5: 3b759c47076298363f4443395e0e51c1
44 Source3: http://releases.llvm.org/%{version}/lldb-%{version}.src.tar.xz
45 # Source3-md5: 76338963b3ccc4f9dccc923716207310
46 Source4: http://releases.llvm.org/%{version}/polly-%{version}.src.tar.xz
47 # Source4-md5: ff689bbfdca3ea812d195f60e63d8346
48 Source5: http://releases.llvm.org/%{version}/clang-tools-extra-%{version}.src.tar.xz
49 # Source5-md5: e98b37a5911cd556775cba0868a56981
50 Source6: http://releases.llvm.org/%{version}/lld-%{version}.src.tar.xz
51 # Source6-md5: 5eb148c3064acff71d8e5856163c8323
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 -gsplit-dwarf
146 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
147 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
149 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
150 # -Werror=format-security is for swig
151 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
152 %define filterout_c -fvar-tracking-assignments
153 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
154 %define filterout_ccpp -fvar-tracking-assignments
157 LLVM is a compiler infrastructure designed for compile-time,
158 link-time, runtime, and idle-time optimization of programs from
159 arbitrary programming languages. LLVM is written in C++ and has been
160 developed since 2000 at the University of Illinois and Apple. It
161 currently supports compilation of C and C++ programs using clang
164 %description -l pl.UTF-8
165 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
166 czasu kompilowania, linkowania, działania i bezczynności programów w
167 dowolnych językach programowania. Jest napisana w C++, rozwijana od
168 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
169 kompilację programów w C i C++ przy użyciu frontendu clang.
172 Summary: LLVM shared libraries
173 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
175 Conflicts: llvm < 3.2
178 LLVM shared libraries.
180 %description libs -l pl.UTF-8
181 Biblioteki współdzielone LLVM-a.
184 Summary: Static libraries and header files for LLVM
185 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
186 Group: Development/Languages
187 Requires: %{name}-libs = %{version}-%{release}
188 Requires: libstdc++-devel >= 6:3.4
191 This package contains static libraries and header files needed to
192 develop new native programs that use the LLVM infrastructure.
194 %description devel -l pl.UTF-8
195 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
196 potrzebne do tworzenia nowych programów natywnych wykorzystujących
200 Summary: Documentation for LLVM
201 Summary(pl.UTF-8): Dokumentacja do LLVM-a
203 # does not require base
206 Documentation for the LLVM compiler infrastructure.
208 %description doc -l pl.UTF-8
209 Dokumentacja do infrastruktury kompilatorów LLVM.
212 Summary: API documentation for LLVM
213 Summary(pl.UTF-8): Dokumentacja API LLVM-a
214 Group: Development/Languages
215 Requires: %{name}-doc = %{version}-%{release}
218 API documentation for the LLVM compiler infrastructure.
220 %description apidocs -l pl.UTF-8
221 Dokumentacja API infrastruktury kompilatorów LLVM.
224 Summary: Polyhedral optimizations for LLVM
225 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
226 Group: Development/Tools
227 URL: http://polly.llvm.org/
228 Requires: %{name} = %{version}-%{release}
231 Polly is a high-level loop and data-locality optimizer and
232 optimization infrastructure for LLVM. It uses an abstract mathematical
233 representation based on integer polyhedra to analyze and optimize the
234 memory access pattern of a program.
236 %description polly -l pl.UTF-8
237 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
238 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
239 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
240 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
243 Summary: Header files for LLVM Polly optimization infrastructure
244 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
245 Group: Development/Libraries
246 URL: http://polly.llvm.org/
247 Requires: %{name}-devel = %{version}-%{release}
248 Requires: %{name}-polly = %{version}-%{release}
250 %description polly-devel
251 Header files for LLVM Polly optimization infrastructure.
253 %description polly-devel -l pl.UTF-8
254 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
257 Summary: A C language family frontend for LLVM
258 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
260 Group: Development/Languages
261 Requires: %{name} = %{version}-%{release}
262 Requires: clang-libs = %{version}-%{release}
264 %description -n clang
265 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
266 of a crane or goose. 3. C-language family front-end toolkit.
268 The goal of the Clang project is to create a new C, C++, Objective C
269 and Objective C++ front-end for the LLVM compiler. Its tools are built
270 as libraries and designed to be loosely-coupled and extendable.
272 %description -n clang -l pl.UTF-8
273 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
274 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
277 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
278 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
279 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
282 %package -n clang-libs
283 Summary: Clang shared libraries
284 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
287 %description -n clang-libs
288 Clang shared libraries.
290 %description -n clang-libs -l pl.UTF-8
291 Biblioteki współdzielone Clanga.
293 %package -n clang-multilib
294 Summary: A C language family frontend for LLVM - 32-bit support
295 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
297 Group: Development/Languages
298 Requires: clang = %{version}-%{release}
300 %description -n clang-multilib
301 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
302 of a crane or goose. 3. C-language family front-end toolkit.
304 The goal of the Clang project is to create a new C, C++, Objective C
305 and Objective C++ front-end for the LLVM compiler. Its tools are built
306 as libraries and designed to be loosely-coupled and extendable.
308 This package contains the C compiler support for producing 32-bit
309 programs on 64-bit host.
311 %description -n clang-multilib -l pl.UTF-8
312 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
313 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
316 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
317 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
318 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
321 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
322 programów 32-bitowych na maszynie 64-bitowej.
324 %package -n clang-analyzer
325 Summary: A source code analysis framework
326 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
328 Group: Development/Languages
329 Requires: clang = %{version}-%{release}
330 # not picked up automatically since files are currently not instaled
331 # in standard Python hierarchies yet
334 %description -n clang-analyzer
335 The Clang Static Analyzer consists of both a source code analysis
336 framework and a standalone tool that finds bugs in C and Objective-C
337 programs. The standalone tool is invoked from the command-line, and is
338 intended to run in tandem with a build of a project or code base.
340 %description -n clang-analyzer -l pl.UTF-8
341 Clang Static Analyzer składa się ze szkieletu do analizy kodu
342 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
343 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
344 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
346 %package -n clang-devel
347 Summary: Header files for Clang
348 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
349 Group: Development/Languages
350 Requires: %{name}-devel = %{version}-%{release}
351 Requires: clang = %{version}-%{release}
353 %description -n clang-devel
354 This package contains header files for the Clang compiler.
356 %description -n clang-devel -l pl.UTF-8
357 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
359 %package -n clang-doc
360 Summary: Documentation for Clang
361 Summary(pl.UTF-8): Dokumentacja do Clanga
363 Requires: %{name} = %{version}-%{release}
365 %description -n clang-doc
366 Documentation for the Clang compiler front-end.
368 %description -n clang-doc -l pl.UTF-8
369 Dokumentacja do frontendu kompilatora Clang.
371 %package -n clang-apidocs
372 Summary: API documentation for Clang
373 Summary(pl.UTF-8): Dokumentacja API Clanga
374 Group: Development/Languages
375 Requires: clang-doc = %{version}-%{release}
377 %description -n clang-apidocs
378 API documentation for the Clang compiler.
380 %description -n clang-apidocs -l pl.UTF-8
381 Dokumentacja API kompilatora Clang.
383 %package -n clang-tools-extra
384 Summary: Extra tools for Clang
385 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
386 Group: Development/Tools
387 URL: http://clang.llvm.org/docs/ClangTools.html
388 Requires: clang = %{version}-%{release}
390 %description -n clang-tools-extra
391 Extra tools for Clang.
393 %description -n clang-tools-extra -l pl.UTF-8
394 Dodatkowe narzędzia do kompilatora Clang.
397 Summary: The LLVM linker
398 Summary(pl.UTF-8): Konsolidator z projektu LLVM
399 Group: Development/Libraries
400 URL: http://lld.llvm.org/
401 Requires: %{name} = %{version}-%{release}
404 lld is a new set of modular code for creating linker tools.
406 %description -n lld -l pl.UTF-8
407 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
410 %package -n lld-devel
411 Summary: Development files for LLD linker tools
412 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
413 Group: Development/Tools
414 URL: http://lld.llvm.org/
415 Requires: %{name}-devel = %{version}-%{release}
417 %description -n lld-devel
418 Development files for LLD linker tools.
420 %description -n lld-devel -l pl.UTF-8
421 Pliki programistyczne narzędzi konsolidujących LLD.
424 Summary: Next generation high-performance debugger
425 Summary(pl.UTF-8): Wydajny debugger nowej generacji
426 Group: Development/Debuggers
427 URL: http://lldb.llvm.org/
428 Requires: %{name} = %{version}-%{release}
432 LLDB is a next generation, high-performance debugger. It is built as a
433 set of reusable components which highly leverage existing libraries in
434 the larger LLVM Project, such as the Clang expression parser and LLVM
437 %description -n lldb -l pl.UTF-8
438 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
439 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
440 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
443 %package -n lldb-devel
444 Summary: Development files for LLDB debugger
445 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
446 Group: Development/Libraries
447 URL: http://lldb.llvm.org/
448 Requires: %{name}-devel = %{version}-%{release}
449 Requires: clang-devel = %{version}-%{release}
450 Requires: lldb = %{version}-%{release}
452 %description -n lldb-devel
453 Development files for LLDB debugger.
455 %description -n lldb-devel -l pl.UTF-8
456 Pliki programistyczne debuggera LLDB.
459 Summary: OCaml binding for LLVM
460 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
462 Requires: %{name} = %{version}-%{release}
464 %requires_eq ocaml-runtime
468 OCaml binding for LLVM.
470 %description ocaml -l pl.UTF-8
471 Wiązanie OCamla do LLVM-a.
474 Summary: Development files for LLVM OCaml binding
475 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
476 Group: Development/Libraries
477 Requires: %{name}-devel = %{version}-%{release}
478 Requires: %{name}-ocaml = %{version}-%{release}
480 %description ocaml-devel
481 The llvm-ocaml-devel package contains libraries and signature files
482 for developing applications that use llvm-ocaml binding.
484 %description ocaml-devel -l pl.UTF-8
485 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
486 wykorzystujących wiązanie llvm-ocaml.
489 Summary: Documentation for LLVM's OCaml binding
490 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
492 Requires: %{name}-ocaml = %{version}-%{release}
494 %description ocaml-doc
495 HTML documentation for LLVM's OCaml binding.
497 %description ocaml-doc -l pl.UTF-8
498 Dokumentacja HTML wiązania OCamla do LLVM-a.
501 Summary: Optimization records visualization tools
502 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
503 Group: Development/Tools
504 Requires: %{name} = %{version}
507 %description opt-viewer
508 Optimization records visualization tools.
510 %description opt-viewer -l pl.UTF-8
511 Narzędzia do wizualizacji rekordów optymalizacji.
513 %package -n vim-plugin-clang
514 Summary: Clang format and rename integration for Vim
515 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
516 Group: Applications/Editors/Vim
517 Requires: vim-rt >= 4:7.0
520 %description -n vim-plugin-clang
521 Clang format and rename integration for Vim.
523 %description -n vim-plugin-clang -l pl.UTF-8
524 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
527 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
528 %{__mv} cfe-%{version}.src tools/clang
529 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
530 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
531 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
532 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
533 %{__mv} lld-%{version}.src tools/lld
540 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
541 s,^#!.*bin/env python,#!%{__python},
542 s,^#!.*bin/env perl,#!%{__perl},
545 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
546 s,^#!.*bin/python.*,#!%{__python},
552 # Disabling assertions now, rec. by pure and needed for OpenGTL
553 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
555 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
558 %if "%{_lib}" == "lib64"
559 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
561 %if "%{_lib}" == "libx32"
562 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
565 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
568 -DLLVM_ENABLE_SPHINX:BOOL=ON \
569 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
571 -DLLVM_ENABLE_PIC:BOOL=ON \
572 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
573 -DLLVM_ENABLE_CXX1Y: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} \
585 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
588 %{__make} check 2>&1 | tee llvm-testlog.txt
589 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
593 %{__make} -C docs docs-llvm-html
594 %{__make} -C docs docs-llvm-man
596 %{__make} -C docs ocaml_doc
598 %{__make} -C tools/clang/docs docs-clang-html
599 %{__make} -C tools/clang/docs docs-clang-man
600 %{__make} -C tools/lld/docs docs-lld-html
602 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
603 -C tools/lldb/docs lldb-python-doc
604 %{__make} -C tools/lldb/docs lldb-cpp-doc
608 rm -rf $RPM_BUILD_ROOT
610 %{__make} -j1 -C build install \
611 DESTDIR=$RPM_BUILD_ROOT
613 # only some .pyc files are created by make install
614 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
615 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
617 # Adjust static analyzer installation
618 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
619 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
620 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
621 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
622 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
623 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
624 %py_postclean %{_datadir}/scan-view
626 # not installed by cmake buildsystem
627 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
630 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
631 # these tools are not installed
632 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
634 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
637 # Move documentation back to build directory
640 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
643 # and separate the apidoc
646 cp -a build/tools/clang/docs/html clang-apidoc
649 # And prepare Clang documentation
651 install -d clang-docs
652 for f in LICENSE.TXT NOTES.txt README.txt; do
653 ln tools/clang/$f clang-docs
656 # Get rid of erroneously installed example files.
657 %{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
659 %{__rm} $RPM_BUILD_ROOT%{_libdir}/TestPlugin.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
668 # disable completeness check incompatible with split packaging
669 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
672 rm -rf $RPM_BUILD_ROOT
674 %post libs -p /sbin/ldconfig
675 %postun libs -p /sbin/ldconfig
677 %post -n clang-libs -p /sbin/ldconfig
678 %postun -n clang-libs -p /sbin/ldconfig
680 %post -n lldb -p /sbin/ldconfig
681 %postun -n lldb -p /sbin/ldconfig
684 %defattr(644,root,root,755)
685 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
686 %attr(755,root,root) %{_bindir}/bugpoint
687 %attr(755,root,root) %{_bindir}/dsymutil
688 %attr(755,root,root) %{_bindir}/llc
689 %attr(755,root,root) %{_bindir}/lli
690 %attr(755,root,root) %{_bindir}/llvm-ar
691 %attr(755,root,root) %{_bindir}/llvm-as
692 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
693 %attr(755,root,root) %{_bindir}/llvm-cat
694 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
695 %attr(755,root,root) %{_bindir}/llvm-cov
696 %attr(755,root,root) %{_bindir}/llvm-cvtres
697 %attr(755,root,root) %{_bindir}/llvm-cxxdump
698 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
699 %attr(755,root,root) %{_bindir}/llvm-diff
700 %attr(755,root,root) %{_bindir}/llvm-dis
701 %attr(755,root,root) %{_bindir}/llvm-dlltool
702 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
703 %attr(755,root,root) %{_bindir}/llvm-dwp
704 %attr(755,root,root) %{_bindir}/llvm-exegesis
705 %attr(755,root,root) %{_bindir}/llvm-extract
706 %attr(755,root,root) %{_bindir}/llvm-lib
707 %attr(755,root,root) %{_bindir}/llvm-link
708 %attr(755,root,root) %{_bindir}/llvm-lto
709 %attr(755,root,root) %{_bindir}/llvm-lto2
710 %attr(755,root,root) %{_bindir}/llvm-mc
711 %attr(755,root,root) %{_bindir}/llvm-mca
712 %attr(755,root,root) %{_bindir}/llvm-modextract
713 %attr(755,root,root) %{_bindir}/llvm-mt
714 %attr(755,root,root) %{_bindir}/llvm-nm
715 %attr(755,root,root) %{_bindir}/llvm-objcopy
716 %attr(755,root,root) %{_bindir}/llvm-objdump
717 %attr(755,root,root) %{_bindir}/llvm-opt-report
718 %attr(755,root,root) %{_bindir}/llvm-pdbutil
719 %attr(755,root,root) %{_bindir}/llvm-profdata
720 %attr(755,root,root) %{_bindir}/llvm-ranlib
721 %attr(755,root,root) %{_bindir}/llvm-rc
722 %attr(755,root,root) %{_bindir}/llvm-readelf
723 %attr(755,root,root) %{_bindir}/llvm-readobj
724 %attr(755,root,root) %{_bindir}/llvm-rtdyld
725 %attr(755,root,root) %{_bindir}/llvm-size
726 %attr(755,root,root) %{_bindir}/llvm-split
727 %attr(755,root,root) %{_bindir}/llvm-strip
728 %attr(755,root,root) %{_bindir}/llvm-stress
729 %attr(755,root,root) %{_bindir}/llvm-strings
730 %attr(755,root,root) %{_bindir}/llvm-symbolizer
731 %attr(755,root,root) %{_bindir}/llvm-tblgen
732 %attr(755,root,root) %{_bindir}/llvm-undname
733 %attr(755,root,root) %{_bindir}/llvm-xray
734 %attr(755,root,root) %{_bindir}/obj2yaml
735 %attr(755,root,root) %{_bindir}/opt
736 %attr(755,root,root) %{_bindir}/sancov
737 %attr(755,root,root) %{_bindir}/sanstats
738 %attr(755,root,root) %{_bindir}/verify-uselistorder
739 %attr(755,root,root) %{_bindir}/yaml2obj
741 %{_mandir}/man1/bugpoint.1*
742 %{_mandir}/man1/dsymutil.1*
743 %{_mandir}/man1/lit.1*
744 %{_mandir}/man1/llc.1*
745 %{_mandir}/man1/lli.1*
746 %{_mandir}/man1/llvm-ar.1*
747 %{_mandir}/man1/llvm-as.1*
748 %{_mandir}/man1/llvm-bcanalyzer.1*
749 %{_mandir}/man1/llvm-cov.1*
750 %{_mandir}/man1/llvm-diff.1*
751 %{_mandir}/man1/llvm-dis.1*
752 %{_mandir}/man1/llvm-dwarfdump.1*
753 %{_mandir}/man1/llvm-exegesis.1*
754 %{_mandir}/man1/llvm-extract.1*
755 %{_mandir}/man1/llvm-lib.1*
756 %{_mandir}/man1/llvm-link.1*
757 %{_mandir}/man1/llvm-mca.1*
758 %{_mandir}/man1/llvm-nm.1*
759 %{_mandir}/man1/llvm-pdbutil.1*
760 %{_mandir}/man1/llvm-profdata.1*
761 %{_mandir}/man1/llvm-ranlib.1*
762 %{_mandir}/man1/llvm-readobj.1*
763 %{_mandir}/man1/llvm-stress.1*
764 %{_mandir}/man1/llvm-symbolizer.1*
765 %{_mandir}/man1/opt.1*
766 %{_mandir}/man1/tblgen.1*
770 %defattr(644,root,root,755)
771 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
773 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
774 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.7
775 %attr(755,root,root) %{_libdir}/LLVMgold.so
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}/BugpointPasses.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} x32
833 %dir %{_libdir}/clang/%{version}/lib
834 %dir %{_libdir}/clang/%{version}/lib/linux
835 %dir %{_libdir}/clang/%{version}/share
838 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
839 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
842 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
843 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
844 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
846 %ifarch %{ix86} %{x8664} x32 %{arm} aarch64 mips mips64 ppc64
847 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
849 %ifarch %{ix86} %{x8664} x32 mips64
850 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
852 %ifarch %{x8664} x32 aarch64 mips64
853 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
854 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
856 %ifarch %{x8664} x32 aarch64
857 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
860 %dir %{_datadir}/clang
861 %{_datadir}/clang/clang-format-diff.py
864 %defattr(644,root,root,755)
865 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
867 %if %{with rt} && %{with multilib}
869 %files -n clang-multilib
870 %defattr(644,root,root,755)
871 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
872 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
875 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
876 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
877 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
881 %files -n clang-analyzer
882 %defattr(644,root,root,755)
883 %attr(755,root,root) %{_bindir}/scan-build
884 %attr(755,root,root) %{_bindir}/scan-view
885 %{_datadir}/scan-build
886 %{_datadir}/scan-view
887 %{_mandir}/man1/scan-build.1*
888 %dir %{_libdir}/scan-build
889 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
890 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
892 %files -n clang-devel
893 %defattr(644,root,root,755)
894 %attr(755,root,root) %{_libdir}/libclang.so
895 %{_libdir}/libclang*.a
897 %{_includedir}/clang-c
898 %{_libdir}/cmake/clang
901 %defattr(644,root,root,755)
902 %doc tools/clang/docs/*.{html,png,txt}
905 %files -n clang-apidocs
906 %defattr(644,root,root,755)
910 %files -n clang-tools-extra
911 %defattr(644,root,root,755)
912 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
913 %attr(755,root,root) %{_bindir}/clang-apply-replacements
914 %attr(755,root,root) %{_bindir}/clang-change-namespace
915 %attr(755,root,root) %{_bindir}/clang-func-mapping
916 %attr(755,root,root) %{_bindir}/clang-include-fixer
917 %attr(755,root,root) %{_bindir}/clang-query
918 %attr(755,root,root) %{_bindir}/clang-refactor
919 %attr(755,root,root) %{_bindir}/clang-rename
920 %attr(755,root,root) %{_bindir}/clang-reorder-fields
921 %attr(755,root,root) %{_bindir}/clang-tidy
922 %attr(755,root,root) %{_bindir}/clangd
923 %attr(755,root,root) %{_bindir}/diagtool
924 %attr(755,root,root) %{_bindir}/find-all-symbols
925 %attr(755,root,root) %{_bindir}/hmaptool
926 %attr(755,root,root) %{_bindir}/modularize
927 %attr(755,root,root) %{_bindir}/pp-trace
928 %{_datadir}/clang/clang-include-fixer.py
929 %{_datadir}/clang/clang-tidy-diff.py
930 %{_datadir}/clang/run-clang-tidy.py
931 %{_datadir}/clang/run-find-all-symbols.py
934 %defattr(644,root,root,755)
935 %doc tools/lld/{LICENSE.TXT,README.md}
936 %attr(755,root,root) %{_bindir}/ld.lld
937 %attr(755,root,root) %{_bindir}/ld64.lld
938 %attr(755,root,root) %{_bindir}/lld
939 %attr(755,root,root) %{_bindir}/lld-link
940 %attr(755,root,root) %{_bindir}/wasm-ld
943 %defattr(644,root,root,755)
944 %{_libdir}/liblld[ACDEHMRWXY]*.a
949 %defattr(644,root,root,755)
950 %attr(755,root,root) %{_bindir}/lldb
951 %attr(755,root,root) %{_bindir}/lldb-argdumper
952 %attr(755,root,root) %{_bindir}/lldb-mi
953 %attr(755,root,root) %{_bindir}/lldb-server
954 %attr(755,root,root) %{_bindir}/lldb-test
955 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
956 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.7
957 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.7
958 %dir %{py_sitedir}/lldb
959 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
960 %{py_sitedir}/lldb/formatters
961 %{py_sitedir}/lldb/runtime
962 %{py_sitedir}/lldb/utils
963 %{py_sitedir}/lldb/__init__.py[co]
964 %{py_sitedir}/lldb/embedded_interpreter.py[co]
965 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
966 %attr(755,root,root) %{py_sitedir}/readline.so
969 %defattr(644,root,root,755)
970 %attr(755,root,root) %{_libdir}/liblldb.so
971 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
972 %{_libdir}/liblldb*.a
978 %defattr(644,root,root,755)
979 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
980 %dir %{_libdir}/ocaml/llvm
981 %{_libdir}/ocaml/llvm/llvm*.cma
982 %{_libdir}/ocaml/llvm/llvm*.cmi
983 %{_libdir}/ocaml/META.llvm*
986 %defattr(644,root,root,755)
987 %{_libdir}/ocaml/llvm/libllvm*.a
988 %{_libdir}/ocaml/llvm/llvm*.a
989 %{_libdir}/ocaml/llvm/llvm*.cmx
990 %{_libdir}/ocaml/llvm/llvm*.cmxa
991 %{_libdir}/ocaml/llvm/llvm*.mli
994 %defattr(644,root,root,755)
999 %defattr(644,root,root,755)
1000 %{_datadir}/opt-viewer
1002 %files -n vim-plugin-clang
1003 %defattr(644,root,root,755)
1004 %{_datadir}/clang/clang-format.py
1005 %{_datadir}/clang/clang-rename.py