3 # - normal build (x86_64) requires about 80 GB of disk space
7 # %{_datadir}/clang/bash-autocomplete.sh
8 # %{_datadir}/clang/clang-format-sublime.py - sublime plugin
9 # %{_datadir}/clang/clang-format.el - clang tools emacs integration
10 # %{_datadir}/clang/clang-include-fixer.el
11 # %{_datadir}/clang/clang-rename.el
12 # - no content in doc package (it used to contain parts of clang apidocs and some examples)
13 # - system isl in polly?
16 %bcond_without lldb # LLDB debugger
17 %bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization
18 %bcond_without rt # compiler-rt libraries
19 %bcond_without multilib # compiler-rt multilib libraries
20 %bcond_with ocaml # OCaml binding
21 %bcond_without doc # HTML docs and man pages
22 %bcond_with apidocs # doxygen docs (HUGE, so they are not built by default)
23 %bcond_with tests # run tests
25 # No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
26 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
30 Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
31 Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
35 License: University of Illinois/NCSA Open Source License
36 Group: Development/Languages
37 #Source0Download: http://releases.llvm.org/download.html
38 Source0: http://releases.llvm.org/%{version}/%{name}-%{version}.src.tar.xz
39 # Source0-md5: 74818f431563603515a62be1ee69a142
40 Source1: http://releases.llvm.org/%{version}/cfe-%{version}.src.tar.xz
41 # Source1-md5: 988b59cdb372c5a4f44ae4c39df3de73
42 Source2: http://releases.llvm.org/%{version}/compiler-rt-%{version}.src.tar.xz
43 # Source2-md5: 547893456e22c75d16189a13881bc866
44 Source3: http://releases.llvm.org/%{version}/lldb-%{version}.src.tar.xz
45 # Source3-md5: 9d319ed0f02a026242a85399938afed2
46 Source4: http://releases.llvm.org/%{version}/polly-%{version}.src.tar.xz
47 # Source4-md5: 7643bba808becabf35785fbacc413ee5
48 Source5: http://releases.llvm.org/%{version}/clang-tools-extra-%{version}.src.tar.xz
49 # Source5-md5: acd22ccbd06bfc0054027fe2644af1e0
50 Source6: http://releases.llvm.org/%{version}/lld-%{version}.src.tar.xz
51 # Source6-md5: c09fb102d4537a0c37a2e8e36a1dc6d2
52 Patch1: %{name}-tld.patch
53 Patch3: x32-gcc-toolchain.patch
54 Patch4: cmake-buildtype.patch
55 Patch5: %{name}-ocaml-shared.patch
59 BuildRequires: cmake >= 3.4.3
61 BuildRequires: gcc >= 5:3.4
62 # gcc4 might be installed, but not current __cc
63 %if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
64 BuildRequires: __cc >= 3.4
67 BuildRequires: libedit-devel
68 BuildRequires: libltdl-devel
69 BuildRequires: libstdc++-devel >= 5:3.4
70 BuildRequires: ncurses-devel
72 BuildRequires: ocaml >= 4.00.0
73 BuildRequires: ocaml-ctypes-devel >= 0.4
74 BuildRequires: ocaml-findlib
75 BuildRequires: ocaml-ocamldoc
76 BuildRequires: ocaml-ounit >= 2
78 BuildRequires: perl-base >= 1:5.6
79 BuildRequires: perl-tools-pod
80 BuildRequires: python >= 1:2.7
81 BuildRequires: rpm-pythonprov
82 BuildRequires: rpmbuild(macros) >= 1.734
83 %{?with_doc:BuildRequires: sphinx-pdg}
84 BuildRequires: tar >= 1:1.22
86 BuildRequires: zlib-devel
88 BuildRequires: doxygen
89 BuildRequires: graphviz
92 BuildRequires: dejagnu
93 BuildRequires: tcl-devel
95 %if %{with rt} && %{with multilib}
97 BuildRequires: gcc-c++-multilib
98 BuildRequires: libstdc++-multilib-devel
101 BuildRequires: gcc-c++-multilib
102 BuildRequires: glibc-devel(x86_64)
103 BuildRequires: libstdc++-multilib-devel
107 BuildRequires: epydoc
109 BuildRequires: libatomic-devel
111 BuildRequires: libxml2-devel >= 2
112 BuildRequires: ncurses-ext-devel
113 BuildRequires: python-devel >= 2
114 BuildRequires: swig-python >= 3.0.11
117 #BuildRequires: gmp-devel or imath-devel (private copy in polly/lib/External/isl/imath)
118 # private copy in polly/lib/External/isl
119 #BuildRequires: isl-devel >= 0.18
120 #TODO (bcond): cuda-devel (with POLLY_ENABLE_GPGPU_CODEGEN=ON)
123 BuildConflicts: llvm-ocaml
125 Requires: %{name}-libs = %{version}-%{release}
126 # LLVM is not supported on PPC64
127 # http://llvm.org/bugs/show_bug.cgi?id=3729
129 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
132 %define _sysconfdir /etc/%{name}
134 %define specflags_ppc -fno-var-tracking-assignments
135 # ix86 and x32 - the same issue as https://llvm.org/bugs/show_bug.cgi?id=27237
136 # use -gsplit-dwarf only when building packages with debuginfo
137 # to avoid excessive disk space usage
138 %if 0%{?_enable_debug_packages}
139 %define specflags -gsplit-dwarf
142 # strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
143 %define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
145 # clang doesn't know -fvar-tracking-assignments, and leaving it here would pollute llvm-config
146 # -Werror=format-security is for swig
147 # TODO: add - -Werror=format-security to tools/lldb/scripts/LLDBWrapPython.cpp
148 %define filterout_c -fvar-tracking-assignments
149 %define filterout_cxx -fvar-tracking-assignments -Werror=format-security
150 %define filterout_ccpp -fvar-tracking-assignments
153 LLVM is a compiler infrastructure designed for compile-time,
154 link-time, runtime, and idle-time optimization of programs from
155 arbitrary programming languages. LLVM is written in C++ and has been
156 developed since 2000 at the University of Illinois and Apple. It
157 currently supports compilation of C and C++ programs using clang
160 %description -l pl.UTF-8
161 LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
162 czasu kompilowania, linkowania, działania i bezczynności programów w
163 dowolnych językach programowania. Jest napisana w C++, rozwijana od
164 roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
165 kompilację programów w C i C++ przy użyciu frontendu clang.
168 Summary: LLVM shared libraries
169 Summary(pl.UTF-8): Biblioteki współdzielone LLVM-a
171 Conflicts: llvm < 3.2
174 LLVM shared libraries.
176 %description libs -l pl.UTF-8
177 Biblioteki współdzielone LLVM-a.
180 Summary: Static libraries and header files for LLVM
181 Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
182 Group: Development/Languages
183 Requires: %{name}-libs = %{version}-%{release}
184 Requires: libstdc++-devel >= 6:3.4
187 This package contains static libraries and header files needed to
188 develop new native programs that use the LLVM infrastructure.
190 %description devel -l pl.UTF-8
191 Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
192 potrzebne do tworzenia nowych programów natywnych wykorzystujących
196 Summary: Documentation for LLVM
197 Summary(pl.UTF-8): Dokumentacja do LLVM-a
199 # does not require base
202 Documentation for the LLVM compiler infrastructure.
204 %description doc -l pl.UTF-8
205 Dokumentacja do infrastruktury kompilatorów LLVM.
208 Summary: API documentation for LLVM
209 Summary(pl.UTF-8): Dokumentacja API LLVM-a
210 Group: Development/Languages
211 Requires: %{name}-doc = %{version}-%{release}
214 API documentation for the LLVM compiler infrastructure.
216 %description apidocs -l pl.UTF-8
217 Dokumentacja API infrastruktury kompilatorów LLVM.
220 Summary: Polyhedral optimizations for LLVM
221 Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
222 Group: Development/Tools
223 URL: http://polly.llvm.org/
224 Requires: %{name} = %{version}-%{release}
227 Polly is a high-level loop and data-locality optimizer and
228 optimization infrastructure for LLVM. It uses an abstract mathematical
229 representation based on integer polyhedra to analyze and optimize the
230 memory access pattern of a program.
232 %description polly -l pl.UTF-8
233 Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
234 optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
235 reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
236 do analizy i optymalizacji wzorców dostępu do pamięci przez program.
239 Summary: Header files for LLVM Polly optimization infrastructure
240 Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
241 Group: Development/Libraries
242 URL: http://polly.llvm.org/
243 Requires: %{name}-devel = %{version}-%{release}
244 Requires: %{name}-polly = %{version}-%{release}
246 %description polly-devel
247 Header files for LLVM Polly optimization infrastructure.
249 %description polly-devel -l pl.UTF-8
250 Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
253 Summary: A C language family frontend for LLVM
254 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
256 Group: Development/Languages
257 Requires: %{name} = %{version}-%{release}
258 Requires: clang-libs = %{version}-%{release}
260 %description -n clang
261 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
262 of a crane or goose. 3. C-language family front-end toolkit.
264 The goal of the Clang project is to create a new C, C++, Objective C
265 and Objective C++ front-end for the LLVM compiler. Its tools are built
266 as libraries and designed to be loosely-coupled and extendable.
268 %description -n clang -l pl.UTF-8
269 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
270 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
273 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
274 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
275 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
278 %package -n clang-libs
279 Summary: Clang shared libraries
280 Summary(pl.UTF-8): Biblioteki współdzielone Clanga
283 %description -n clang-libs
284 Clang shared libraries.
286 %description -n clang-libs -l pl.UTF-8
287 Biblioteki współdzielone Clanga.
289 %package -n clang-multilib
290 Summary: A C language family frontend for LLVM - 32-bit support
291 Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
293 Group: Development/Languages
294 Requires: clang = %{version}-%{release}
296 %description -n clang-multilib
297 clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
298 of a crane or goose. 3. C-language family front-end toolkit.
300 The goal of the Clang project is to create a new C, C++, Objective C
301 and Objective C++ front-end for the LLVM compiler. Its tools are built
302 as libraries and designed to be loosely-coupled and extendable.
304 This package contains the C compiler support for producing 32-bit
305 programs on 64-bit host.
307 %description -n clang-multilib -l pl.UTF-8
308 clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
309 piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
312 Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
313 LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
314 budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
317 Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
318 programów 32-bitowych na maszynie 64-bitowej.
320 %package -n clang-analyzer
321 Summary: A source code analysis framework
322 Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
324 Group: Development/Languages
325 Requires: clang = %{version}-%{release}
326 # not picked up automatically since files are currently not instaled
327 # in standard Python hierarchies yet
330 %description -n clang-analyzer
331 The Clang Static Analyzer consists of both a source code analysis
332 framework and a standalone tool that finds bugs in C and Objective-C
333 programs. The standalone tool is invoked from the command-line, and is
334 intended to run in tandem with a build of a project or code base.
336 %description -n clang-analyzer -l pl.UTF-8
337 Clang Static Analyzer składa się ze szkieletu do analizy kodu
338 źródłowego oraz samodzielnego narzędzia znajdującego błędy w
339 programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
340 myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
342 %package -n clang-devel
343 Summary: Header files for Clang
344 Summary(pl.UTF-8): Pliki nagłówkowe Clanga
345 Group: Development/Languages
346 Requires: %{name}-devel = %{version}-%{release}
347 Requires: clang = %{version}-%{release}
349 %description -n clang-devel
350 This package contains header files for the Clang compiler.
352 %description -n clang-devel -l pl.UTF-8
353 Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
355 %package -n clang-doc
356 Summary: Documentation for Clang
357 Summary(pl.UTF-8): Dokumentacja do Clanga
359 Requires: %{name} = %{version}-%{release}
361 %description -n clang-doc
362 Documentation for the Clang compiler front-end.
364 %description -n clang-doc -l pl.UTF-8
365 Dokumentacja do frontendu kompilatora Clang.
367 %package -n clang-apidocs
368 Summary: API documentation for Clang
369 Summary(pl.UTF-8): Dokumentacja API Clanga
370 Group: Development/Languages
371 Requires: clang-doc = %{version}-%{release}
373 %description -n clang-apidocs
374 API documentation for the Clang compiler.
376 %description -n clang-apidocs -l pl.UTF-8
377 Dokumentacja API kompilatora Clang.
379 %package -n clang-tools-extra
380 Summary: Extra tools for Clang
381 Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
382 Group: Development/Tools
383 URL: http://clang.llvm.org/docs/ClangTools.html
384 Requires: clang = %{version}-%{release}
386 %description -n clang-tools-extra
387 Extra tools for Clang.
389 %description -n clang-tools-extra -l pl.UTF-8
390 Dodatkowe narzędzia do kompilatora Clang.
393 Summary: The LLVM linker
394 Summary(pl.UTF-8): Konsolidator z projektu LLVM
395 Group: Development/Libraries
396 URL: http://lld.llvm.org/
397 Requires: %{name} = %{version}-%{release}
400 lld is a new set of modular code for creating linker tools.
402 %description -n lld -l pl.UTF-8
403 lld to nowy zbiór modularnego kodu do tworzenia narzędzi
406 %package -n lld-devel
407 Summary: Development files for LLD linker tools
408 Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
409 Group: Development/Tools
410 URL: http://lld.llvm.org/
411 Requires: %{name}-devel = %{version}-%{release}
413 %description -n lld-devel
414 Development files for LLD linker tools.
416 %description -n lld-devel -l pl.UTF-8
417 Pliki programistyczne narzędzi konsolidujących LLD.
420 Summary: Next generation high-performance debugger
421 Summary(pl.UTF-8): Wydajny debugger nowej generacji
422 Group: Development/Debuggers
423 URL: http://lldb.llvm.org/
424 Requires: %{name} = %{version}-%{release}
428 LLDB is a next generation, high-performance debugger. It is built as a
429 set of reusable components which highly leverage existing libraries in
430 the larger LLVM Project, such as the Clang expression parser and LLVM
433 %description -n lldb -l pl.UTF-8
434 LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
435 komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
436 w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
439 %package -n lldb-devel
440 Summary: Development files for LLDB debugger
441 Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
442 Group: Development/Libraries
443 URL: http://lldb.llvm.org/
444 Requires: %{name}-devel = %{version}-%{release}
445 Requires: clang-devel = %{version}-%{release}
446 Requires: lldb = %{version}-%{release}
448 %description -n lldb-devel
449 Development files for LLDB debugger.
451 %description -n lldb-devel -l pl.UTF-8
452 Pliki programistyczne debuggera LLDB.
455 Summary: OCaml binding for LLVM
456 Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
458 Requires: %{name} = %{version}-%{release}
460 %requires_eq ocaml-runtime
464 OCaml binding for LLVM.
466 %description ocaml -l pl.UTF-8
467 Wiązanie OCamla do LLVM-a.
470 Summary: Development files for LLVM OCaml binding
471 Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
472 Group: Development/Libraries
473 Requires: %{name}-devel = %{version}-%{release}
474 Requires: %{name}-ocaml = %{version}-%{release}
476 %description ocaml-devel
477 The llvm-ocaml-devel package contains libraries and signature files
478 for developing applications that use llvm-ocaml binding.
480 %description ocaml-devel -l pl.UTF-8
481 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
482 wykorzystujących wiązanie llvm-ocaml.
485 Summary: Documentation for LLVM's OCaml binding
486 Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
488 Requires: %{name}-ocaml = %{version}-%{release}
490 %description ocaml-doc
491 HTML documentation for LLVM's OCaml binding.
493 %description ocaml-doc -l pl.UTF-8
494 Dokumentacja HTML wiązania OCamla do LLVM-a.
497 Summary: Optimization records visualization tools
498 Summary(pl.UTF-8): Narzędzia do wizualizacji rekordów optymalizacji
499 Group: Development/Tools
500 Requires: %{name} = %{version}
503 %description opt-viewer
504 Optimization records visualization tools.
506 %description opt-viewer -l pl.UTF-8
507 Narzędzia do wizualizacji rekordów optymalizacji.
509 %package -n vim-plugin-clang
510 Summary: Clang format and rename integration for Vim
511 Summary(pl.UTF-8): Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem
512 Group: Applications/Editors/Vim
513 Requires: vim-rt >= 4:7.0
516 %description -n vim-plugin-clang
517 Clang format and rename integration for Vim.
519 %description -n vim-plugin-clang -l pl.UTF-8
520 Integracja narzędzi Clang do formatowania i zmiany nazw z Vimem.
523 %setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
524 %{__mv} cfe-%{version}.src tools/clang
525 %{?with_rt:%{__mv} compiler-rt-%{version}.src projects/compiler-rt}
526 %{?with_lldb:%{__mv} lldb-%{version}.src tools/lldb}
527 %{?with_polly:%{__mv} polly-%{version}.src tools/polly}
528 %{__mv} clang-tools-extra-%{version}.src tools/clang/tools/extra
529 %{__mv} lld-%{version}.src tools/lld
536 grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
537 s,^#!.*bin/env python,#!%{__python},
538 s,^#!.*bin/env perl,#!%{__perl},
541 find -name '*.py' -print0 | xargs -0 sed -i -e '1{
542 s,^#!.*bin/python.*,#!%{__python},
548 # Disabling assertions now, rec. by pure and needed for OpenGTL
549 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
551 CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
554 %if "%{_lib}" == "lib64"
555 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
557 %if "%{_lib}" == "libx32"
558 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
561 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
564 -DLLVM_ENABLE_SPHINX:BOOL=ON \
565 -DSPHINX_WARNINGS_AS_ERRORS=OFF \
567 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
568 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
569 -DLLVM_ENABLE_RTTI:BOOL=ON \
570 -DLLVM_ENABLE_PIC:BOOL=ON \
571 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
572 -DLLVM_BUILD_LLVM_DYLIB:BOOL=ON \
573 -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
574 -DBUILD_SHARED_LIBS:BOOL=OFF \
575 -DENABLE_LINKER_BUILD_ID:BOOL=ON \
576 -DLLVM_BINUTILS_INCDIR:STRING=%{_includedir} \
581 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
584 %{__make} check 2>&1 | tee llvm-testlog.txt
585 %{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
589 %{__make} -C docs docs-llvm-html
590 %{__make} -C docs docs-llvm-man
592 %{__make} -C docs ocaml_doc
594 %{__make} -C tools/clang/docs docs-clang-html
595 %{__make} -C tools/clang/docs docs-clang-man
596 %{__make} -C tools/lld/docs docs-lld-html
598 LD_LIBRARY_PATH=$(pwd)/%{_lib} \
599 -C tools/lldb/docs lldb-python-doc
600 %{__make} -C tools/lldb/docs lldb-cpp-doc
604 rm -rf $RPM_BUILD_ROOT
606 %{__make} -j1 -C build install \
607 DESTDIR=$RPM_BUILD_ROOT
609 # only some .pyc files are created by make install
610 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
611 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
613 # Adjust static analyzer installation
614 # http://clang-analyzer.llvm.org/installation#OtherPlatforms
615 install -d $RPM_BUILD_ROOT%{_libdir}/scan-build
616 %{__mv} $RPM_BUILD_ROOT%{_prefix}/libexec/c??-analyzer $RPM_BUILD_ROOT%{_libdir}/scan-build
617 %{__sed} -i -e 's,/\.\./libexec/,/../%{_lib}/scan-build/,' $RPM_BUILD_ROOT%{_bindir}/scan-build
618 %py_comp $RPM_BUILD_ROOT%{_datadir}/scan-view
619 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/scan-view
620 %py_postclean %{_datadir}/scan-view
622 # not installed by cmake buildsystem
623 install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
626 cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
627 # these tools are not installed
628 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
630 echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
633 # Move documentation back to build directory
636 %{__mv} $RPM_BUILD_ROOT%{_docdir}/llvm/ocaml-html ocamldocs
639 # and separate the apidoc
642 cp -a build/tools/clang/docs/html clang-apidoc
645 # And prepare Clang documentation
647 install -d clang-docs
648 for f in LICENSE.TXT NOTES.txt README.txt; do
649 ln tools/clang/$f clang-docs
652 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{c-index-test,llvm-c-test}
654 %{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
656 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/six.py*
657 # it seems it is used internally by an extra clang tool
658 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfindAllSymbols.a
660 # disable completeness check incompatible with split packaging
661 %{__sed} -i -e '/^foreach(target .*IMPORT_CHECK_TARGETS/,/^endforeach/d; /^unset(_IMPORT_CHECK_TARGETS)/d' $RPM_BUILD_ROOT%{_libdir}/cmake/llvm/LLVMExports.cmake
664 rm -rf $RPM_BUILD_ROOT
666 %post libs -p /sbin/ldconfig
667 %postun libs -p /sbin/ldconfig
669 %post -n clang-libs -p /sbin/ldconfig
670 %postun -n clang-libs -p /sbin/ldconfig
672 %post -n lldb -p /sbin/ldconfig
673 %postun -n lldb -p /sbin/ldconfig
676 %defattr(644,root,root,755)
677 %doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
678 %attr(755,root,root) %{_bindir}/bugpoint
679 %attr(755,root,root) %{_bindir}/dsymutil
680 %attr(755,root,root) %{_bindir}/llc
681 %attr(755,root,root) %{_bindir}/lli
682 %attr(755,root,root) %{_bindir}/llvm-ar
683 %attr(755,root,root) %{_bindir}/llvm-as
684 %attr(755,root,root) %{_bindir}/llvm-bcanalyzer
685 %attr(755,root,root) %{_bindir}/llvm-cat
686 %attr(755,root,root) %{_bindir}/llvm-cfi-verify
687 %attr(755,root,root) %{_bindir}/llvm-cov
688 %attr(755,root,root) %{_bindir}/llvm-cvtres
689 %attr(755,root,root) %{_bindir}/llvm-cxxdump
690 %attr(755,root,root) %{_bindir}/llvm-cxxfilt
691 %attr(755,root,root) %{_bindir}/llvm-cxxmap
692 %attr(755,root,root) %{_bindir}/llvm-diff
693 %attr(755,root,root) %{_bindir}/llvm-dis
694 %attr(755,root,root) %{_bindir}/llvm-dlltool
695 %attr(755,root,root) %{_bindir}/llvm-dwarfdump
696 %attr(755,root,root) %{_bindir}/llvm-dwp
697 %attr(755,root,root) %{_bindir}/llvm-elfabi
698 %attr(755,root,root) %{_bindir}/llvm-exegesis
699 %attr(755,root,root) %{_bindir}/llvm-extract
700 %attr(755,root,root) %{_bindir}/llvm-lib
701 %attr(755,root,root) %{_bindir}/llvm-link
702 %attr(755,root,root) %{_bindir}/llvm-lto
703 %attr(755,root,root) %{_bindir}/llvm-lto2
704 %attr(755,root,root) %{_bindir}/llvm-mc
705 %attr(755,root,root) %{_bindir}/llvm-mca
706 %attr(755,root,root) %{_bindir}/llvm-modextract
707 %attr(755,root,root) %{_bindir}/llvm-mt
708 %attr(755,root,root) %{_bindir}/llvm-nm
709 %attr(755,root,root) %{_bindir}/llvm-objcopy
710 %attr(755,root,root) %{_bindir}/llvm-objdump
711 %attr(755,root,root) %{_bindir}/llvm-opt-report
712 %attr(755,root,root) %{_bindir}/llvm-pdbutil
713 %attr(755,root,root) %{_bindir}/llvm-profdata
714 %attr(755,root,root) %{_bindir}/llvm-ranlib
715 %attr(755,root,root) %{_bindir}/llvm-rc
716 %attr(755,root,root) %{_bindir}/llvm-readelf
717 %attr(755,root,root) %{_bindir}/llvm-readobj
718 %attr(755,root,root) %{_bindir}/llvm-rtdyld
719 %attr(755,root,root) %{_bindir}/llvm-size
720 %attr(755,root,root) %{_bindir}/llvm-split
721 %attr(755,root,root) %{_bindir}/llvm-strip
722 %attr(755,root,root) %{_bindir}/llvm-stress
723 %attr(755,root,root) %{_bindir}/llvm-strings
724 %attr(755,root,root) %{_bindir}/llvm-symbolizer
725 %attr(755,root,root) %{_bindir}/llvm-tblgen
726 %attr(755,root,root) %{_bindir}/llvm-undname
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-cxxmap.1*
745 %{_mandir}/man1/llvm-diff.1*
746 %{_mandir}/man1/llvm-dis.1*
747 %{_mandir}/man1/llvm-dwarfdump.1*
748 %{_mandir}/man1/llvm-exegesis.1*
749 %{_mandir}/man1/llvm-extract.1*
750 %{_mandir}/man1/llvm-lib.1*
751 %{_mandir}/man1/llvm-link.1*
752 %{_mandir}/man1/llvm-mca.1*
753 %{_mandir}/man1/llvm-nm.1*
754 %{_mandir}/man1/llvm-objdump.1*
755 %{_mandir}/man1/llvm-pdbutil.1*
756 %{_mandir}/man1/llvm-profdata.1*
757 %{_mandir}/man1/llvm-ranlib.1*
758 %{_mandir}/man1/llvm-readobj.1*
759 %{_mandir}/man1/llvm-stress.1*
760 %{_mandir}/man1/llvm-symbolizer.1*
761 %{_mandir}/man1/opt.1*
762 %{_mandir}/man1/tblgen.1*
766 %defattr(644,root,root,755)
767 %attr(755,root,root) %{_libdir}/libLLVM-%{abi}.so
769 %attr(755,root,root) %{_libdir}/libLLVM-%{version}.so
770 %attr(755,root,root) %ghost %{_libdir}/libLTO.so.8
771 %attr(755,root,root) %{_libdir}/LLVMgold.so
772 %attr(755,root,root) %{_libdir}/libOptRemarks.so.8
775 %defattr(644,root,root,755)
776 %attr(755,root,root) %{_bindir}/llvm-config
777 %attr(755,root,root) %{_libdir}/libLLVM.so
778 %attr(755,root,root) %{_libdir}/libLTO.so
779 %attr(755,root,root) %{_libdir}/libOptRemarks.so
780 %{_libdir}/libLLVM*.a
782 %{_includedir}/llvm-c
783 %{_libdir}/cmake/llvm
785 %{_mandir}/man1/llvm-config.1*
789 #%defattr(644,root,root,755)
793 %defattr(644,root,root,755)
799 %defattr(644,root,root,755)
800 %doc tools/polly/{CREDITS.txt,LICENSE.txt,README} tools/polly/www/{bugs,changelog,contributors}.html
801 %attr(755,root,root) %{_libdir}/LLVMPolly.so
804 %defattr(644,root,root,755)
805 %{_libdir}/libPolly.a
806 %{_libdir}/libPollyISL.a
807 %{_libdir}/libPollyPPCG.a
809 %{_libdir}/cmake/polly
813 %defattr(644,root,root,755)
814 %doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
815 %attr(755,root,root) %{_bindir}/clang
816 %attr(755,root,root) %{_bindir}/clang++
817 %attr(755,root,root) %{_bindir}/clang-%{abi}
818 %attr(755,root,root) %{_bindir}/clang-check
819 %attr(755,root,root) %{_bindir}/clang-cl
820 %attr(755,root,root) %{_bindir}/clang-cpp
821 %attr(755,root,root) %{_bindir}/clang-format
822 %attr(755,root,root) %{_bindir}/clang-import-test
823 %attr(755,root,root) %{_bindir}/clang-offload-bundler
824 %attr(755,root,root) %{_bindir}/git-clang-format
825 %dir %{_libdir}/clang
826 %dir %{_libdir}/clang/%{version}
827 %{_libdir}/clang/%{version}/include
829 %ifarch %{ix86} %{x8664}
830 %dir %{_libdir}/clang/%{version}/lib
831 %dir %{_libdir}/clang/%{version}/lib/linux
832 %dir %{_libdir}/clang/%{version}/share
836 %dir %{_libdir}/clang/%{version}/lib
837 %dir %{_libdir}/clang/%{version}/lib/linux
838 %dir %{_libdir}/clang/%{version}/share
842 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
843 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
846 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
847 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
848 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
850 %ifarch %{ix86} %{x8664} %{arm} aarch64 mips mips64 ppc64
851 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
853 %ifarch %{ix86} %{x8664} mips64
854 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
856 %ifarch %{x8664} aarch64 mips64
857 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
858 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
860 %ifarch %{x8664} aarch64
861 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
865 %{_libdir}/clang/%{version}/share/asan_blacklist.txt
866 %{_libdir}/clang/%{version}/share/cfi_blacklist.txt
867 %{_libdir}/clang/%{version}/share/dfsan_abilist.txt
868 %{_libdir}/clang/%{version}/share/msan_blacklist.txt
869 %{_libdir}/clang/%{version}/share/hwasan_blacklist.txt
873 %dir %{_datadir}/clang
874 %{_datadir}/clang/clang-format-diff.py
877 %defattr(644,root,root,755)
878 %attr(755,root,root) %{_libdir}/libclang.so.%{abi}
880 %if %{with rt} && %{with multilib}
882 %files -n clang-multilib
883 %defattr(644,root,root,755)
884 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
885 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
888 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
889 %attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
890 %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
894 %files -n clang-analyzer
895 %defattr(644,root,root,755)
896 %attr(755,root,root) %{_bindir}/scan-build
897 %attr(755,root,root) %{_bindir}/scan-view
898 %{_datadir}/scan-build
899 %{_datadir}/scan-view
900 %{_mandir}/man1/scan-build.1*
901 %dir %{_libdir}/scan-build
902 %attr(755,root,root) %{_libdir}/scan-build/c++-analyzer
903 %attr(755,root,root) %{_libdir}/scan-build/ccc-analyzer
905 %files -n clang-devel
906 %defattr(644,root,root,755)
907 %attr(755,root,root) %{_libdir}/libclang.so
908 %{_libdir}/libclang*.a
910 %{_includedir}/clang-c
911 %{_libdir}/cmake/clang
914 %defattr(644,root,root,755)
915 %doc tools/clang/docs/*.{html,png,txt}
918 %files -n clang-apidocs
919 %defattr(644,root,root,755)
923 %files -n clang-tools-extra
924 %defattr(644,root,root,755)
925 %doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt}
926 %attr(755,root,root) %{_bindir}/clang-apply-replacements
927 %attr(755,root,root) %{_bindir}/clang-change-namespace
928 %attr(755,root,root) %{_bindir}/clang-extdef-mapping
929 %attr(755,root,root) %{_bindir}/clang-include-fixer
930 %attr(755,root,root) %{_bindir}/clang-query
931 %attr(755,root,root) %{_bindir}/clang-refactor
932 %attr(755,root,root) %{_bindir}/clang-rename
933 %attr(755,root,root) %{_bindir}/clang-reorder-fields
934 %attr(755,root,root) %{_bindir}/clang-tidy
935 %attr(755,root,root) %{_bindir}/clangd
936 %attr(755,root,root) %{_bindir}/diagtool
937 %attr(755,root,root) %{_bindir}/find-all-symbols
938 %attr(755,root,root) %{_bindir}/hmaptool
939 %attr(755,root,root) %{_bindir}/modularize
940 %attr(755,root,root) %{_bindir}/pp-trace
941 %{_datadir}/clang/clang-include-fixer.py
942 %{_datadir}/clang/clang-tidy-diff.py
943 %{_datadir}/clang/run-clang-tidy.py
944 %{_datadir}/clang/run-find-all-symbols.py
947 %defattr(644,root,root,755)
948 %doc tools/lld/{LICENSE.TXT,README.md}
949 %attr(755,root,root) %{_bindir}/ld.lld
950 %attr(755,root,root) %{_bindir}/ld64.lld
951 %attr(755,root,root) %{_bindir}/lld
952 %attr(755,root,root) %{_bindir}/lld-link
953 %attr(755,root,root) %{_bindir}/wasm-ld
956 %defattr(644,root,root,755)
957 %{_libdir}/liblld[ACDEHMRWXY]*.a
962 %defattr(644,root,root,755)
963 %attr(755,root,root) %{_bindir}/lldb
964 %attr(755,root,root) %{_bindir}/lldb-argdumper
965 %attr(755,root,root) %{_bindir}/lldb-mi
966 %attr(755,root,root) %{_bindir}/lldb-server
967 %attr(755,root,root) %{_bindir}/lldb-test
968 %attr(755,root,root) %{_bindir}/lldb-vscode
969 %attr(755,root,root) %{_libdir}/liblldb.so.%{version}
970 %attr(755,root,root) %ghost %{_libdir}/liblldb.so.8
971 %attr(755,root,root) %ghost %{_libdir}/liblldbIntelFeatures.so.8
972 %dir %{py_sitedir}/lldb
973 %attr(755,root,root) %{py_sitedir}/lldb/lldb-argdumper
974 %{py_sitedir}/lldb/formatters
975 %{py_sitedir}/lldb/runtime
976 %{py_sitedir}/lldb/utils
977 %{py_sitedir}/lldb/__init__.py[co]
978 %{py_sitedir}/lldb/embedded_interpreter.py[co]
979 %attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
980 %attr(755,root,root) %{py_sitedir}/readline.so
983 %defattr(644,root,root,755)
984 %attr(755,root,root) %{_libdir}/liblldb.so
985 %attr(755,root,root) %{_libdir}/liblldbIntelFeatures.so
986 %{_libdir}/liblldb*.a
992 %defattr(644,root,root,755)
993 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllllvm*.so
994 %dir %{_libdir}/ocaml/llvm
995 %{_libdir}/ocaml/llvm/llvm*.cma
996 %{_libdir}/ocaml/llvm/llvm*.cmi
997 %{_libdir}/ocaml/META.llvm*
1000 %defattr(644,root,root,755)
1001 %{_libdir}/ocaml/llvm/libllvm*.a
1002 %{_libdir}/ocaml/llvm/llvm*.a
1003 %{_libdir}/ocaml/llvm/llvm*.cmx
1004 %{_libdir}/ocaml/llvm/llvm*.cmxa
1005 %{_libdir}/ocaml/llvm/llvm*.mli
1008 %defattr(644,root,root,755)
1013 %defattr(644,root,root,755)
1014 %{_datadir}/opt-viewer
1016 %files -n vim-plugin-clang
1017 %defattr(644,root,root,755)
1018 %{_datadir}/clang/clang-format.py
1019 %{_datadir}/clang/clang-rename.py