]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
- cleanup files
[packages/llvm.git] / llvm.spec
CommitLineData
6df3b432
JB
1# TODO:
2# - move and package:
3# %{_datadir}/clang/clang-format-sublime.py - sublime plugin
4# %{_datadir}/clang/clang-format.el - emacs mode
5# %{_datadir}/clang/clang-format.py - vim plugin
6# - no content in doc package (it used to contain parts of clang apidocs and some examples)
bc88141a 7#
9556f4c9 8# Conditional build:
5a7ac479 9%bcond_without lldb # LLDB debugger
b0068ae4 10%bcond_without polly # Polly cache-locality optimization, auto-parallelism and vectorization
5a7ac479 11%bcond_without rt # compiler-rt libraries
6df3b432 12%bcond_without ocaml # OCaml binding
b0068ae4 13%bcond_without doc # HTML docs and man pages
5a7ac479 14%bcond_with apidocs # doxygen docs (HUGE, so they are not built by default)
8132e62b 15%bcond_with tests # run tests
9556f4c9 16
4ba3b2b3
JB
17# No ocaml on other arches or no native ocaml (required for ocaml-ctypes)
18%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
9556f4c9
ER
19%undefine with_ocaml
20%endif
21
aa11c230 22Summary: The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
2326a99f 23Summary(pl.UTF-8): Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
aa11c230 24Name: llvm
41876fe7 25Version: 3.7.0
c7939933 26Release: 6
aa11c230 27License: University of Illinois/NCSA Open Source License
28Group: Development/Languages
dd9350c7 29#Source0Download: http://llvm.org/releases/download.html
b883cf1e 30Source0: http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
41876fe7 31# Source0-md5: b98b9495e5655a672d6cb83e1a180f8e
b883cf1e 32Source1: http://llvm.org/releases/%{version}/cfe-%{version}.src.tar.xz
41876fe7 33# Source1-md5: 8f9d27335e7331cf0a4711e952f21f01
b883cf1e 34Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.src.tar.xz
41876fe7 35# Source2-md5: 383c10affd513026f08936b5525523f5
b883cf1e 36Source3: http://llvm.org/releases/%{version}/lldb-%{version}.src.tar.xz
41876fe7 37# Source3-md5: e5931740400d1dc3e7db4c7ba2ceff68
b883cf1e 38Source4: http://llvm.org/releases/%{version}/polly-%{version}.src.tar.xz
41876fe7 39# Source4-md5: 32f93ffc9cc7e042df22089761558f8b
b883cf1e 40Source5: http://llvm.org/releases/%{version}/clang-tools-extra-%{version}.src.tar.xz
41876fe7 41# Source5-md5: d5a87dacb65d981a427a536f6964642e
ba1cf74d 42Source6: http://llvm.org/releases/%{version}/lld-%{version}.src.tar.xz
41876fe7 43# Source6-md5: 91bd593a67293d84dad0bf11845546c2
3c402b7e 44Patch0: %{name}-lld-link.patch
9f7b77bd
JR
45Patch1: %{name}-pld.patch
46Patch2: libdir.patch
47Patch3: x32-gcc-toolchain.patch
303f4f9e 48Patch5: debuginfo-fix.patch
2326a99f 49URL: http://llvm.org/
bc88141a 50BuildRequires: bash
d997b14b 51BuildRequires: bison
ac5fd320 52BuildRequires: cmake
d997b14b 53BuildRequires: flex
dd9350c7
JB
54BuildRequires: gcc >= 5:3.4
55# gcc4 might be installed, but not current __cc
56%if "%(echo %{cc_version} | cut -d. -f1,2)" < "3.4"
57BuildRequires: __cc >= 3.4
9556f4c9 58%endif
2bbd0701
JR
59%ifarch x32
60BuildRequires: glibc-devel(x86_64)
61%endif
d997b14b 62BuildRequires: groff
bc88141a 63BuildRequires: libltdl-devel
d997b14b 64BuildRequires: libstdc++-devel >= 5:3.4
2bbd0701 65%if %{with ocaml}
c6c890ee 66BuildRequires: ocaml-ctypes-devel >= 0.4
2bbd0701 67BuildRequires: ocaml-findlib
77c13dab 68BuildRequires: ocaml-ocamldoc
2bbd0701
JR
69BuildRequires: ocaml-ounit
70%endif
8132e62b 71BuildRequires: perl-base >= 1:5.6
8c156e7d 72BuildRequires: perl-tools-pod
73BuildRequires: rpm-pythonprov
b0068ae4 74%{?with_doc:BuildRequires: sphinx-pdg}
b883cf1e
JB
75BuildRequires: tar >= 1:1.22
76BuildRequires: xz
dd9350c7
JB
77%if %{with apidocs}
78BuildRequires: doxygen
79BuildRequires: graphviz
80%endif
81%if %{with tests}
82BuildRequires: dejagnu
83BuildRequires: python
84BuildRequires: tcl-devel
356a0bbd 85%endif
b883cf1e 86%if %{with lldb}
c6c890ee 87BuildRequires: epydoc
64f4e87f
JB
88%ifarch i386 i486
89BuildRequires: libatomic-devel
90%endif
b883cf1e
JB
91BuildRequires: libedit-devel
92BuildRequires: libxml2-devel >= 2
93BuildRequires: ncurses-ext-devel
94BuildRequires: python-devel >= 2
c6c890ee 95BuildRequires: swig-python
b883cf1e 96%endif
b0068ae4
JB
97%if %{with polly}
98BuildRequires: cloog-isl-devel
b883cf1e 99# >= 0.18.2-2
b0068ae4 100BuildRequires: gmp-devel
2bbd0701 101BuildRequires: isl-devel >= 0.14
b883cf1e 102# optional
3eca6fe9 103BuildRequires: pluto-devel
b883cf1e 104BuildRequires: scoplib-devel >= 0.2.1-2
b0068ae4
JB
105#cuda-devel
106%endif
8c514f23 107Requires: %{name}-libs = %{version}-%{release}
9556f4c9
ER
108# LLVM is not supported on PPC64
109# http://llvm.org/bugs/show_bug.cgi?id=3729
110ExcludeArch: ppc64
aa11c230 111BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
112
356a0bbd 113%define _sysconfdir /etc/%{name}
021b3c3d 114
9556f4c9
ER
115%define specflags_ppc -fno-var-tracking-assignments
116
6832a5c5
ER
117# strip corrupts: $RPM_BUILD_ROOT/usr/lib64/llvm-gcc/bin/llvm-c++ ...
118%define _noautostrip .*/\\(libmud.*\\.a\\|bin/llvm-.*\\|lib.*++\\.a\\)
119
4a1d21cc
JR
120# clang doesn't know it, and leaving it here would pollute llvm-config
121%define filterout_c -fvar-tracking-assignments
122%define filterout_cxx -fvar-tracking-assignments
123%define filterout_ccpp -fvar-tracking-assignments
124
6df3b432
JB
125# std::__once_call, std::__once_callable non-function symbols
126%define skip_post_check_so liblldAArch64ELFTarget.so.* liblldARMELFTarget.so.* liblldHexagonELFTarget.so.* liblldMipsELFTarget.so.* liblldb.so.*
127
aa11c230 128%description
129LLVM is a compiler infrastructure designed for compile-time,
130link-time, runtime, and idle-time optimization of programs from
131arbitrary programming languages. LLVM is written in C++ and has been
132developed since 2000 at the University of Illinois and Apple. It
621ec11f
JB
133currently supports compilation of C and C++ programs using clang
134frontend.
aa11c230 135
2326a99f
JB
136%description -l pl.UTF-8
137LLVM to infrastruktura kompilatora zaprojektowana do optymalizacji
138czasu kompilowania, linkowania, działania i bezczynności programów w
139dowolnych językach programowania. Jest napisana w C++, rozwijana od
140roku 2000 przez Uniwersytet w Illinois i Apple. Aktualnie obsługuje
621ec11f 141kompilację programów w C i C++ przy użyciu frontendu clang.
2326a99f 142
8c514f23
JB
143%package libs
144Summary: LLVM shared library
145Summary(pl.UTF-8): Biblioteka współdzielona LLVM-a
146Group: Libraries
147Conflicts: llvm < 3.2
148
149%description libs
150LLVM shared library.
151
152%description libs -l pl.UTF-8
153Biblioteka współdzielona LLVM-a.
154
bc88141a 155%package devel
621ec11f
JB
156Summary: Static libraries and header files for LLVM
157Summary(pl.UTF-8): Biblioteki statyczne i pliki nagłówkowe dla LLVM-a
bc88141a 158Group: Development/Languages
8c514f23 159Requires: %{name}-libs = %{version}-%{release}
bc88141a
ER
160Requires: libstdc++-devel >= 6:3.4
161
162%description devel
621ec11f
JB
163This package contains static libraries and header files needed to
164develop new native programs that use the LLVM infrastructure.
165
166%description devel -l pl.UTF-8
167Ten pakiet zawiera biblioteki statyczne oraz pliki nagłówkowe
168potrzebne do tworzenia nowych programów natywnych wykorzystujących
169infrastrukturę LLVM.
bc88141a 170
9556f4c9
ER
171%package doc
172Summary: Documentation for LLVM
621ec11f 173Summary(pl.UTF-8): Dokumentacja do LLVM-a
9556f4c9
ER
174Group: Documentation
175# does not require base
bc88141a 176
9556f4c9
ER
177%description doc
178Documentation for the LLVM compiler infrastructure.
bc88141a 179
621ec11f
JB
180%description doc -l pl.UTF-8
181Dokumentacja do infrastruktury kompilatorów LLVM.
182
9556f4c9
ER
183%package apidocs
184Summary: API documentation for LLVM
621ec11f 185Summary(pl.UTF-8): Dokumentacja API LLVM-a
9556f4c9
ER
186Group: Development/Languages
187Requires: %{name}-doc = %{version}-%{release}
bc88141a 188
9556f4c9
ER
189%description apidocs
190API documentation for the LLVM compiler infrastructure.
bc88141a 191
621ec11f
JB
192%description apidocs -l pl.UTF-8
193Dokumentacja API infrastruktury kompilatorów LLVM.
194
b0068ae4
JB
195%package polly
196Summary: Polyhedral optimizations for LLVM
197Summary(pl.UTF-8): Optymalizacje wielościanowe dla LLVM-a
198Group: Development/Tools
199URL: http://polly.llvm.org/
200Requires: %{name} = %{version}-%{release}
201
202%description polly
203Polly is a high-level loop and data-locality optimizer and
204optimization infrastructure for LLVM. It uses an abstract mathematical
205representation based on integer polyhedra to analyze and optimize the
206memory access pattern of a program.
207
208%description polly -l pl.UTF-8
209Polly to wysokopoziomowy optymalizator i infrastruktura LLVM-a do
210optymalizacji pętli i położenia danych. Wykorzystuje abstrakcyjną
211reprezentację matematyczną opartą na wielościanach całkowitoliczbowych
212do analizy i optymalizacji wzorców dostępu do pamięci przez program.
213
214%package polly-devel
215Summary: Header files for LLVM Polly optimization infrastructure
216Summary(pl.UTF-8): Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly
217Group: Development/Libraries
218URL: http://polly.llvm.org/
219Requires: %{name}-devel = %{version}-%{release}
220Requires: %{name}-polly = %{version}-%{release}
221
222%description polly-devel
223Header files for LLVM Polly optimization infrastructure.
224
225%description polly-devel -l pl.UTF-8
226Pliki nagłówkowe infrastruktury optymalizacji LLVM-a Polly.
227
d997b14b
AM
228%package -n clang
229Summary: A C language family frontend for LLVM
621ec11f 230Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C
d997b14b
AM
231License: NCSA
232Group: Development/Languages
8c514f23 233Requires: %{name} = %{version}-%{release}
d997b14b
AM
234
235%description -n clang
236clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
237of a crane or goose. 3. C-language family front-end toolkit.
238
239The goal of the Clang project is to create a new C, C++, Objective C
240and Objective C++ front-end for the LLVM compiler. Its tools are built
241as libraries and designed to be loosely-coupled and extendable.
242
621ec11f
JB
243%description -n clang -l pl.UTF-8
244clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
245piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
246z rodziny C.
247
248Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
249LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
250budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
251i rozszerzaniu.
252
9eefd942
JR
253%package -n clang-multilib
254Summary: A C language family frontend for LLVM - 32-bit support
255Summary(pl.UTF-8): Frontend LLVM-a do języków z rodziny C - obsługa binariów 32-bitowych
256License: NCSA
257Group: Development/Languages
258Requires: clang = %{version}-%{release}
259
260%description -n clang-multilib
261clang: noun 1. A loud, resonant, metallic sound. 2. The strident call
262of a crane or goose. 3. C-language family front-end toolkit.
263
264The goal of the Clang project is to create a new C, C++, Objective C
265and Objective C++ front-end for the LLVM compiler. Its tools are built
266as libraries and designed to be loosely-coupled and extendable.
267
268This package contains the C compiler support for producing 32-bit
269programs on 64-bit host.
270
271%description -n clang-multilib -l pl.UTF-8
272clang (z angielskiego): 1. głośny, rezonujący, metaliczny dźwięk; 2.
273piskliwy odgłos żurawia lub gęsi; 3. narzędzia frontendowe dla języków
274z rodziny C.
275
276Celem projektu Clang jest utworzenie nowego frontendu dla kompilatora
277LLVM do języków C, C++, Objective C i Objective C++. Narzędzia są
278budowane jako biblioteki i zaprojektowane z myślą o swobodnym łączeniu
279i rozszerzaniu.
280
281Ten pakiet zawiera rozszerzenie kompilatora C o obsługę tworzenia
282programów 32-bitowych na maszynie 64-bitowej.
283
d997b14b
AM
284%package -n clang-analyzer
285Summary: A source code analysis framework
621ec11f 286Summary(pl.UTF-8): Szkielet do analizy kodu źródłowego
d997b14b
AM
287License: NCSA
288Group: Development/Languages
289Requires: clang = %{version}-%{release}
290# not picked up automatically since files are currently not instaled
291# in standard Python hierarchies yet
292Requires: python
293
294%description -n clang-analyzer
295The Clang Static Analyzer consists of both a source code analysis
296framework and a standalone tool that finds bugs in C and Objective-C
297programs. The standalone tool is invoked from the command-line, and is
298intended to run in tandem with a build of a project or code base.
299
621ec11f
JB
300%description -n clang-analyzer -l pl.UTF-8
301Clang Static Analyzer składa się ze szkieletu do analizy kodu
302źródłowego oraz samodzielnego narzędzia znajdującego błędy w
303programach w C i C++. Narzędzie jest wywoływane z linii poleceń, z
304myślą o uruchamianiu wraz z kompilacją projektu lub kodu.
305
9556f4c9 306%package -n clang-devel
621ec11f
JB
307Summary: Header files for Clang
308Summary(pl.UTF-8): Pliki nagłówkowe Clanga
9556f4c9 309Group: Development/Languages
8c514f23 310Requires: %{name}-devel = %{version}-%{release}
9556f4c9
ER
311Requires: clang = %{version}-%{release}
312
313%description -n clang-devel
314This package contains header files for the Clang compiler.
315
621ec11f
JB
316%description -n clang-devel -l pl.UTF-8
317Ten pakiet zawiera pliki nagłówkowe kompilatora Clang.
318
9556f4c9
ER
319%package -n clang-doc
320Summary: Documentation for Clang
621ec11f 321Summary(pl.UTF-8): Dokumentacja do Clanga
9556f4c9
ER
322Group: Documentation
323Requires: %{name} = %{version}-%{release}
324
325%description -n clang-doc
326Documentation for the Clang compiler front-end.
327
621ec11f
JB
328%description -n clang-doc -l pl.UTF-8
329Dokumentacja do frontendu kompilatora Clang.
330
9556f4c9
ER
331%package -n clang-apidocs
332Summary: API documentation for Clang
621ec11f 333Summary(pl.UTF-8): Dokumentacja API Clanga
9556f4c9
ER
334Group: Development/Languages
335Requires: clang-doc = %{version}-%{release}
336
337%description -n clang-apidocs
338API documentation for the Clang compiler.
339
621ec11f
JB
340%description -n clang-apidocs -l pl.UTF-8
341Dokumentacja API kompilatora Clang.
342
b0068ae4
JB
343%package -n clang-tools-extra
344Summary: Extra tools for Clang
345Summary(pl.UTF-8): Dodatkowe narzędzia do kompilatora Clang
346Group: Development/Tools
347URL: http://clang.llvm.org/docs/ClangTools.html
348Requires: clang = %{version}-%{release}
349
350%description -n clang-tools-extra
351Extra tools for Clang.
352
353%description -n clang-tools-extra -l pl.UTF-8
354Dodatkowe narzędzia do kompilatora Clang.
355
ba1cf74d
JB
356%package -n lld
357Summary: The LLVM linker
358Summary(pl.UTF-8): Konsolidator z projektu LLVM
359Group: Development/Libraries
360URL: http://lld.llvm.org/
361Requires: %{name} = %{version}-%{release}
362
363%description -n lld
364lld is a new set of modular code for creating linker tools.
365
366%description -n lld -l pl.UTF-8
367lld to nowy zbiór modularnego kodu do tworzenia narzędzi
368konsolidujących.
369
370%package -n lld-devel
371Summary: Development files for LLD linker tools
372Summary(pl.UTF-8): Pliki programistyczne narzędzi konsolidujących LLD
373Group: Development/Tools
374URL: http://lld.llvm.org/
375Requires: %{name}-devel = %{version}-%{release}
376
377%description -n lld-devel
378Development files for LLD linker tools.
379
380%description -n lld-devel -l pl.UTF-8
381Pliki programistyczne narzędzi konsolidujących LLD.
382
5a7ac479
JB
383%package -n lldb
384Summary: Next generation high-performance debugger
385Summary(pl.UTF-8): Wydajny debugger nowej generacji
386Group: Development/Debuggers
ba1cf74d 387URL: http://lldb.llvm.org/
5a7ac479
JB
388Requires: %{name} = %{version}-%{release}
389
390%description -n lldb
391LLDB is a next generation, high-performance debugger. It is built as a
392set of reusable components which highly leverage existing libraries in
393the larger LLVM Project, such as the Clang expression parser and LLVM
394disassembler.
395
396%description -n lldb -l pl.UTF-8
397LLDB to wydajny debugger nowej generacji. Jest zbudowany w oparciu o
398komponenty wielokrotnego użytku, wykorzystujące istniejące biblioteki
399w projekcie LLVM, takie jak analizator wyrażeń kompilatora Clang oraz
400disasembler LLVM.
401
402%package -n lldb-devel
ba1cf74d
JB
403Summary: Development files for LLDB debugger
404Summary(pl.UTF-8): Pliki programistyczne debuggera LLDB
5a7ac479 405Group: Development/Libraries
ba1cf74d 406URL: http://lldb.llvm.org/
5a7ac479
JB
407Requires: %{name}-devel = %{version}-%{release}
408Requires: clang-devel = %{version}-%{release}
409Requires: lldb = %{version}-%{release}
410
411%description -n lldb-devel
ba1cf74d 412Development files for LLDB debugger.
5a7ac479
JB
413
414%description -n lldb-devel -l pl.UTF-8
ba1cf74d 415Pliki programistyczne debuggera LLDB.
5a7ac479 416
9556f4c9
ER
417%package ocaml
418Summary: OCaml binding for LLVM
621ec11f
JB
419Summary(pl.UTF-8): Wiązanie OCamla do LLVM-a
420Group: Libraries
9556f4c9
ER
421Requires: %{name} = %{version}-%{release}
422%requires_eq ocaml-runtime
423
621ec11f 424%description ocaml
9556f4c9
ER
425OCaml binding for LLVM.
426
621ec11f
JB
427%description ocaml -l pl.UTF-8
428Wiązanie OCamla do LLVM-a.
429
9556f4c9 430%package ocaml-devel
621ec11f
JB
431Summary: Development files for LLVM OCaml binding
432Summary(pl.UTF-8): Pliki programistyczne wiązania OCamla do LLVM-a
9556f4c9
ER
433Group: Development/Libraries
434Requires: %{name}-devel = %{version}-%{release}
435Requires: %{name}-ocaml = %{version}-%{release}
436
437%description ocaml-devel
438The llvm-ocaml-devel package contains libraries and signature files
621ec11f
JB
439for developing applications that use llvm-ocaml binding.
440
441%description ocaml-devel -l pl.UTF-8
442Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
443wykorzystujących wiązanie llvm-ocaml.
444
9556f4c9
ER
445%package ocaml-doc
446Summary: Documentation for LLVM's OCaml binding
621ec11f 447Summary(pl.UTF-8): Dokumentacja wiązania OCamla do LLVM-a
9556f4c9
ER
448Group: Documentation
449Requires: %{name}-ocaml = %{version}-%{release}
450
451%description ocaml-doc
452HTML documentation for LLVM's OCaml binding.
453
621ec11f
JB
454%description ocaml-doc -l pl.UTF-8
455Dokumentacja HTML wiązania OCamla do LLVM-a.
456
aa11c230 457%prep
ba1cf74d 458%setup -q -n %{name}-%{version}.src -a1 %{?with_rt:-a2} %{?with_lldb:-a3} %{?with_polly:-a4} -a5 -a6
c999855f 459mv cfe-%{version}.src tools/clang
b883cf1e
JB
460%{?with_rt:mv compiler-rt-%{version}.src projects/compiler-rt}
461%{?with_lldb:mv lldb-%{version}.src tools/lldb}
462%{?with_polly:mv polly-%{version}.src tools/polly}
463mv clang-tools-extra-%{version}.src tools/clang/tools/extra
ba1cf74d 464mv lld-%{version}.src tools/lld
5a7ac479 465
3c402b7e 466%patch0 -p1
9f7b77bd 467%patch1 -p1
ebde279d 468%patch2 -p1
9f7b77bd 469%patch3 -p1
303f4f9e 470%patch5 -p1
ce9cc204 471
bacc8b96
ER
472grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
473 s,^#!.*bin/env python,#!%{__python},
474 s,^#!.*bin/env perl,#!%{__perl},
475}'
476
d756c460 477%build
41876fe7 478install -d build
ebde279d 479
d997b14b 480# Disabling assertions now, rec. by pure and needed for OpenGTL
9556f4c9 481# TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
41876fe7 482cd build
5e689738 483CPPFLAGS="%{rpmcppflags} -D_FILE_OFFSET_BITS=64"
2bbd0701 484
41876fe7
JR
485%{cmake} ../ \
486%ifarch %{x8664}
487 -DLLVM_LIBDIR_SUFFIX:STRING=64 \
488%endif
489%ifarch x32
490 -DLLVM_LIBDIR_SUFFIX:STRING=x32 \
491%endif
9556f4c9 492%if %{with apidocs}
41876fe7 493 -DLLVM_ENABLE_DOXYGEN:BOOL=ON \
d997b14b 494%endif
41876fe7
JR
495%if %{with doc}
496 -DLLVM_ENABLE_SPHINX:BOOL=ON \
497%endif
6c382d2a 498 -DLLVM_ENABLE_PIC:BOOL=ON \
41876fe7
JR
499 -DLLVM_ENABLE_ASSERTIONS:BOOL=OFF \
500 -DLLVM_ENABLE_CXX1Y:BOOL=ON \
82174e17 501 -DLLVM_BINDINGS_LIST:LIST="%{?with_ocaml:ocaml}" \
41876fe7
JR
502 -DBUILD_SHARED_LIBS:BOOL=ON
503
d997b14b 504%{__make} \
1628dc68 505 VERBOSE=1 \
0a0b7076 506 REQUIRES_RTTI=1 \
d997b14b 507 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
aa11c230 508
827664e9 509%if %{with tests}
9556f4c9
ER
510%{__make} check 2>&1 | tee llvm-testlog.txt
511%{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
512%endif
513
b0068ae4 514%if %{with doc}
41876fe7
JR
515%{__make} -C docs docs-llvm-html
516%{__make} -C docs docs-llvm-man
c6c890ee 517%if %{with ocaml}
41876fe7 518%{__make} -C docs ocaml_doc
c6c890ee 519%endif
41876fe7
JR
520%{__make} -C tools/clang/docs docs-clang-html
521%{__make} -C tools/clang/docs docs-clang-man
522%{__make} -C tools/lld/docs docs-lld-html
523%{__make} -C tools/lldb/docs lldb-python-doc
524%{__make} -C tools/lldb/docs lldb-cpp-doc
6df3b432 525%{__make} -C ../tools/clang/tools/extra/docs html
dd9350c7
JB
526%endif
527
aa11c230 528%install
529rm -rf $RPM_BUILD_ROOT
41876fe7 530%{__make} -C build install \
aa11c230 531 DESTDIR=$RPM_BUILD_ROOT
532
6df3b432
JB
533# only some .pyc files are created by make install
534%py_comp $RPM_BUILD_ROOT%{py_sitedir}
535%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
536
d997b14b 537# Static analyzer not installed by default:
9556f4c9
ER
538# http://clang-analyzer.llvm.org/installation#OtherPlatforms
539install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
d997b14b
AM
540# create launchers
541for f in scan-{build,view}; do
9556f4c9
ER
542 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
543 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
d997b14b 544done
41876fe7 545install -d $RPM_BUILD_ROOT%{_mandir}/man1
dd9350c7 546%{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1
8132e62b
JB
547%py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
548%py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
549%py_postclean %{_libdir}/clang-analyzer/scan-view
4ba3b2b3
JB
550# not this OS
551%{__rm} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/*.bat
d997b14b 552
6df3b432
JB
553# not installed by cmake buildsystem
554install build/bin/clang-query $RPM_BUILD_ROOT%{_bindir}
555install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
556
b0068ae4 557%if %{with doc}
6df3b432 558cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
b883cf1e
JB
559# these tools are not installed
560%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
b0068ae4
JB
561# make links
562echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
dd9350c7
JB
563%endif
564
d997b14b 565# Move documentation back to build directory
2bbd0701 566%if %{with ocaml}
6df3b432
JB
567rm -rf ocamldocs
568mv $RPM_BUILD_ROOT%{_prefix}/docs/ocaml/html/html ocamldocs
2bbd0701 569%endif
9556f4c9
ER
570
571# and separate the apidoc
572%if %{with apidocs}
6df3b432
JB
573rm -rf clang-apidoc
574cp -a build/tools/clang/docs/html clang-apidoc
9556f4c9 575%endif
d997b14b
AM
576
577# And prepare Clang documentation
d997b14b 578rm -rf clang-docs
9556f4c9 579install -d clang-docs
827664e9 580for f in LICENSE.TXT NOTES.txt README.txt; do
9556f4c9 581 ln tools/clang/$f clang-docs
d997b14b 582done
021b3c3d 583
6832a5c5 584# Get rid of erroneously installed example files.
6df3b432
JB
585%{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
586# test?
587%{__rm} $RPM_BUILD_ROOT%{_bindir}/llvm-c-test
588# not this OS
589%{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
6832a5c5 590
aa11c230 591%clean
592rm -rf $RPM_BUILD_ROOT
593
8c514f23
JB
594%post libs -p /sbin/ldconfig
595%postun libs -p /sbin/ldconfig
aa11c230 596
5a7ac479
JB
597%post -n clang -p /sbin/ldconfig
598%postun -n clang -p /sbin/ldconfig
599
6df3b432
JB
600%post -n clang-tools-extra -p /sbin/ldconfig
601%postun -n clang-tools-extra -p /sbin/ldconfig
602
5a7ac479
JB
603%post -n lldb -p /sbin/ldconfig
604%postun -n lldb -p /sbin/ldconfig
605
aa11c230 606%files
607%defattr(644,root,root,755)
8132e62b 608%doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
a9beeab5 609%attr(755,root,root) %{_bindir}/bugpoint
a9beeab5
JB
610%attr(755,root,root) %{_bindir}/llc
611%attr(755,root,root) %{_bindir}/lli
8132e62b
JB
612%attr(755,root,root) %{_bindir}/llvm-ar
613%attr(755,root,root) %{_bindir}/llvm-as
614%attr(755,root,root) %{_bindir}/llvm-bcanalyzer
827664e9 615%attr(755,root,root) %{_bindir}/llvm-cov
8132e62b
JB
616%attr(755,root,root) %{_bindir}/llvm-diff
617%attr(755,root,root) %{_bindir}/llvm-dis
4ba3b2b3 618%attr(755,root,root) %{_bindir}/llvm-dsymutil
827664e9 619%attr(755,root,root) %{_bindir}/llvm-dwarfdump
8132e62b 620%attr(755,root,root) %{_bindir}/llvm-extract
6df3b432 621%attr(755,root,root) %{_bindir}/llvm-lib
8132e62b 622%attr(755,root,root) %{_bindir}/llvm-link
3c402b7e
JB
623%ifarch %{x8664} x32
624%attr(755,root,root) %{_bindir}/llvm-lto
625%endif
8132e62b 626%attr(755,root,root) %{_bindir}/llvm-mc
dd9350c7 627%attr(755,root,root) %{_bindir}/llvm-mcmarkup
8132e62b
JB
628%attr(755,root,root) %{_bindir}/llvm-nm
629%attr(755,root,root) %{_bindir}/llvm-objdump
b883cf1e 630%attr(755,root,root) %{_bindir}/llvm-profdata
8132e62b 631%attr(755,root,root) %{_bindir}/llvm-ranlib
f981d747 632%attr(755,root,root) %{_bindir}/llvm-readobj
827664e9
PS
633%attr(755,root,root) %{_bindir}/llvm-rtdyld
634%attr(755,root,root) %{_bindir}/llvm-size
f981d747 635%attr(755,root,root) %{_bindir}/llvm-stress
1628dc68 636%attr(755,root,root) %{_bindir}/llvm-symbolizer
827664e9 637%attr(755,root,root) %{_bindir}/llvm-tblgen
41876fe7
JR
638%attr(755,root,root) %{_bindir}/llvm-cxxdump
639%attr(755,root,root) %{_bindir}/llvm-pdbdump
a7973f21 640%attr(755,root,root) %{_bindir}/macho-dump
4ba3b2b3 641%attr(755,root,root) %{_bindir}/obj2yaml
8132e62b 642%attr(755,root,root) %{_bindir}/opt
4ba3b2b3
JB
643%attr(755,root,root) %{_bindir}/verify-uselistorder
644%attr(755,root,root) %{_bindir}/yaml2obj
b0068ae4 645%if %{with doc}
a9beeab5 646%{_mandir}/man1/bugpoint.1*
a7973f21 647%{_mandir}/man1/lit.1*
a9beeab5
JB
648%{_mandir}/man1/llc.1*
649%{_mandir}/man1/lli.1*
8132e62b
JB
650%{_mandir}/man1/llvm-ar.1*
651%{_mandir}/man1/llvm-as.1*
652%{_mandir}/man1/llvm-bcanalyzer.1*
f981d747 653%{_mandir}/man1/llvm-cov.1*
8132e62b
JB
654%{_mandir}/man1/llvm-diff.1*
655%{_mandir}/man1/llvm-dis.1*
b883cf1e 656%{_mandir}/man1/llvm-dwarfdump.1*
8132e62b 657%{_mandir}/man1/llvm-extract.1*
8132e62b
JB
658%{_mandir}/man1/llvm-link.1*
659%{_mandir}/man1/llvm-nm.1*
b883cf1e 660%{_mandir}/man1/llvm-profdata.1*
8132e62b 661%{_mandir}/man1/llvm-ranlib.1*
c999855f 662%{_mandir}/man1/llvm-readobj.1*
f981d747 663%{_mandir}/man1/llvm-stress.1*
1628dc68 664%{_mandir}/man1/llvm-symbolizer.1*
a9beeab5 665%{_mandir}/man1/opt.1*
dd9350c7 666%{_mandir}/man1/tblgen.1*
b0068ae4 667%endif
bc88141a 668
8c514f23
JB
669%files libs
670%defattr(644,root,root,755)
6df3b432
JB
671%attr(755,root,root) %{_libdir}/libLLVM*.so.%{version}
672%attr(755,root,root) %ghost %{_libdir}/libLLVM*.so.3.7
3c402b7e
JB
673%ifarch %{x8664} x32
674%attr(755,root,root) %{_libdir}/libLTO.so.%{version}
675%attr(755,root,root) %ghost %{_libdir}/libLTO.so.3.7
676%endif
8c514f23 677
bc88141a
ER
678%files devel
679%defattr(644,root,root,755)
680%attr(755,root,root) %{_bindir}/llvm-config
6df3b432 681%attr(755,root,root) %{_libdir}/libLLVM*.so
0a8510f2 682%attr(755,root,root) %{_libdir}/BugpointPasses.so
6df3b432 683%ifarch %{x8664} x32
19f21eee 684%attr(755,root,root) %{_libdir}/libLTO.so
1655c8b5 685%endif
8132e62b
JB
686%{_includedir}/llvm
687%{_includedir}/llvm-c
b883cf1e
JB
688%dir %{_datadir}/llvm
689%{_datadir}/llvm/cmake
b0068ae4 690%if %{with doc}
8132e62b 691%{_mandir}/man1/llvm-config.1*
b0068ae4 692%endif
bc88141a 693
6df3b432
JB
694#%files doc
695#%defattr(644,root,root,755)
9556f4c9
ER
696
697%if %{with apidocs}
698%files apidocs
699%defattr(644,root,root,755)
700%doc apidoc/*
701%endif
702
b0068ae4
JB
703%if %{with polly}
704%files polly
705%defattr(644,root,root,755)
706%doc tools/polly/{CREDITS.txt,LICENSE.txt,README}
707%attr(755,root,root) %{_libdir}/LLVMPolly.so
6df3b432 708%attr(755,root,root) %{_libdir}/libPolly.so
b0068ae4
JB
709
710%files polly-devel
711%defattr(644,root,root,755)
b0068ae4
JB
712%{_includedir}/polly
713%endif
714
d997b14b 715%files -n clang
bc88141a 716%defattr(644,root,root,755)
827664e9 717%doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
8132e62b
JB
718%attr(755,root,root) %{_bindir}/clang
719%attr(755,root,root) %{_bindir}/clang++
6df3b432 720%attr(755,root,root) %{_bindir}/clang-3.7
dd9350c7 721%attr(755,root,root) %{_bindir}/clang-check
6df3b432 722%attr(755,root,root) %{_bindir}/clang-cl
1628dc68 723%attr(755,root,root) %{_bindir}/clang-format
6df3b432 724%attr(755,root,root) %{_bindir}/git-clang-format
7c2dbc88
JR
725%attr(755,root,root) %{_libdir}/libclang.so.3.7
726%attr(755,root,root) %{_libdir}/libclang[A-Z]*.so.%{version}
727%attr(755,root,root) %ghost %{_libdir}/libclang[A-Z]*.so.3.7
5a7ac479
JB
728%dir %{_libdir}/clang
729%dir %{_libdir}/clang/%{version}
730%{_libdir}/clang/%{version}/include
731%if %{with rt}
c6c890ee 732%ifarch %{ix86} %{x8664}
6df3b432 733%{_libdir}/clang/%{version}/asan_blacklist.txt
9eefd942
JR
734%dir %{_libdir}/clang/%{version}/lib
735%dir %{_libdir}/clang/%{version}/lib/linux
736%endif
737%ifarch %{ix86}
738%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
739%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
c6c890ee
JB
740%endif
741%ifarch %{x8664}
3c402b7e
JB
742%{_libdir}/clang/%{version}/dfsan_abilist.txt
743%{_libdir}/clang/%{version}/msan_blacklist.txt
9eefd942
JR
744%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
745%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
f4c0e8bd 746%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
3c402b7e 747%endif
5a7ac479 748%endif
3c402b7e
JB
749%dir %{_datadir}/clang
750%{_datadir}/clang/clang-format-diff.py
d997b14b 751
9eefd942
JR
752%if %{with rt}
753%ifarch %{x8664}
754%files -n clang-multilib
755%defattr(644,root,root,755)
756%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
757%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
758%endif
759%endif
760
d997b14b 761%files -n clang-analyzer
bc88141a 762%defattr(644,root,root,755)
d997b14b
AM
763%attr(755,root,root) %{_bindir}/scan-build
764%attr(755,root,root) %{_bindir}/scan-view
dd9350c7 765%{_mandir}/man1/scan-build.1*
ae49e501 766%dir %{_libdir}/clang-analyzer
d997b14b 767
9556f4c9
ER
768%dir %{_libdir}/clang-analyzer/scan-build
769%{_libdir}/clang-analyzer/scan-build/*.css
770%{_libdir}/clang-analyzer/scan-build/*.js
771%attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
772%attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
773
8132e62b
JB
774%dir %{_libdir}/clang-analyzer/scan-view
775%attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
776%{_libdir}/clang-analyzer/scan-view/Resources
777%{_libdir}/clang-analyzer/scan-view/*.py[co]
778
9556f4c9
ER
779%files -n clang-devel
780%defattr(644,root,root,755)
6df3b432 781%attr(755,root,root) %{_libdir}/libclang*.so
9556f4c9
ER
782%{_includedir}/clang
783%{_includedir}/clang-c
784
785%files -n clang-doc
786%defattr(644,root,root,755)
41876fe7 787%doc tools/clang/docs/*.{html,png,txt}
9556f4c9
ER
788
789%if %{with apidocs}
790%files -n clang-apidocs
791%defattr(644,root,root,755)
792%doc clang-apidoc/*
793%endif
794
b0068ae4
JB
795%files -n clang-tools-extra
796%defattr(644,root,root,755)
6df3b432 797%doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt} tools/clang/tools/extra/docs/_build/html/{*.html,*.js,_static}
b0068ae4
JB
798%attr(755,root,root) %{_bindir}/clang-apply-replacements
799%attr(755,root,root) %{_bindir}/clang-modernize
b883cf1e 800%attr(755,root,root) %{_bindir}/clang-query
4ba3b2b3 801%attr(755,root,root) %{_bindir}/clang-rename
b0068ae4
JB
802%attr(755,root,root) %{_bindir}/clang-tidy
803%attr(755,root,root) %{_bindir}/pp-trace
6df3b432
JB
804%attr(755,root,root) %{_libdir}/libmodernizeCore.so.%{version}
805%attr(755,root,root) %ghost %{_libdir}/libmodernizeCore.so.3.7
806# -devel?
807%attr(755,root,root) %{_libdir}/libmodernizeCore.so
b0068ae4 808
ba1cf74d
JB
809%files -n lld
810%defattr(644,root,root,755)
811%doc tools/lld/{LICENSE.TXT,README.md}
812%attr(755,root,root) %{_bindir}/lld
6df3b432
JB
813%attr(755,root,root) %{_libdir}/liblld[ACDEHMPRXY]*.so.%{version}
814%attr(755,root,root) %ghost %{_libdir}/liblld[ACDEHMPRXY]*.so.3.7
ba1cf74d
JB
815
816%files -n lld-devel
817%defattr(644,root,root,755)
6df3b432 818%attr(755,root,root) %{_libdir}/liblld[ACDEHMPRXY]*.so
ba1cf74d
JB
819%{_includedir}/lld
820
5a7ac479
JB
821%if %{with lldb}
822%files -n lldb
823%defattr(644,root,root,755)
6df3b432 824%attr(755,root,root) %{_bindir}/argdumper
5a7ac479 825%attr(755,root,root) %{_bindir}/lldb
6df3b432 826%attr(755,root,root) %{_bindir}/lldb-%{version}
b883cf1e 827%attr(755,root,root) %{_bindir}/lldb-mi
6df3b432
JB
828%attr(755,root,root) %{_bindir}/lldb-mi-%{version}
829%attr(755,root,root) %{_bindir}/lldb-server
830%attr(755,root,root) %{_bindir}/lldb-server-%{version}
831%attr(755,root,root) %{_libdir}/liblldb.so.%{version}
832%attr(755,root,root) %ghost %{_libdir}/liblldb.so.3.7
b883cf1e 833%dir %{py_sitedir}/lldb
41876fe7 834%attr(755,root,root) %{py_sitedir}/lldb/argdumper
6df3b432
JB
835%{py_sitedir}/lldb/formatters
836%{py_sitedir}/lldb/runtime
837%{py_sitedir}/lldb/utils
838%{py_sitedir}/lldb/__init__.py[co]
839%{py_sitedir}/lldb/embedded_interpreter.py[co]
b883cf1e
JB
840%attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
841%attr(755,root,root) %{py_sitedir}/readline.so
5a7ac479
JB
842
843%files -n lldb-devel
844%defattr(644,root,root,755)
6df3b432 845%attr(755,root,root) %{_libdir}/liblldb.so
5a7ac479
JB
846%{_libdir}/liblldb*.a
847%{_includedir}/lldb
848%endif
849
9556f4c9 850%if %{with ocaml}
d997b14b
AM
851%files ocaml
852%defattr(644,root,root,755)
11b6f380
JB
853%{_libdir}/ocaml/META.llvm*
854%attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
8132e62b
JB
855%{_libdir}/ocaml/llvm*.cma
856%{_libdir}/ocaml/llvm*.cmi
d997b14b
AM
857
858%files ocaml-devel
859%defattr(644,root,root,755)
8132e62b
JB
860%{_libdir}/ocaml/libllvm*.a
861%{_libdir}/ocaml/llvm*.a
862%{_libdir}/ocaml/llvm*.cmx*
9556f4c9
ER
863
864%files ocaml-doc
865%defattr(644,root,root,755)
6df3b432 866%doc ocamldocs/*
9556f4c9 867%endif
This page took 0.208097 seconds and 4 git commands to generate.