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