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