]> git.pld-linux.org Git - packages/llvm.git/blame - llvm.spec
one more -lpthread fix
[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
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
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
d96b39d3 489%patch4 -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
d96b39d3 504%cmake \
41876fe7
JR
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}" \
d96b39d3
ER
521 -DBUILD_SHARED_LIBS:BOOL=ON \
522 ../
41876fe7 523
d997b14b 524%{__make} \
1628dc68 525 VERBOSE=1 \
0a0b7076 526 REQUIRES_RTTI=1 \
d997b14b 527 OPTIMIZE_OPTION="%{rpmcflags} %{rpmcppflags}"
aa11c230 528
827664e9 529%if %{with tests}
9556f4c9
ER
530%{__make} check 2>&1 | tee llvm-testlog.txt
531%{__make} -C tools/clang test 2>&1 | tee clang-testlog.txt
532%endif
533
b0068ae4 534%if %{with doc}
41876fe7
JR
535%{__make} -C docs docs-llvm-html
536%{__make} -C docs docs-llvm-man
c6c890ee 537%if %{with ocaml}
41876fe7 538%{__make} -C docs ocaml_doc
c6c890ee 539%endif
41876fe7
JR
540%{__make} -C tools/clang/docs docs-clang-html
541%{__make} -C tools/clang/docs docs-clang-man
542%{__make} -C tools/lld/docs docs-lld-html
543%{__make} -C tools/lldb/docs lldb-python-doc
544%{__make} -C tools/lldb/docs lldb-cpp-doc
6df3b432 545%{__make} -C ../tools/clang/tools/extra/docs html
dd9350c7
JB
546%endif
547
aa11c230 548%install
549rm -rf $RPM_BUILD_ROOT
41876fe7 550%{__make} -C build install \
aa11c230 551 DESTDIR=$RPM_BUILD_ROOT
552
6df3b432
JB
553# only some .pyc files are created by make install
554%py_comp $RPM_BUILD_ROOT%{py_sitedir}
555%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
556
d997b14b 557# Static analyzer not installed by default:
9556f4c9
ER
558# http://clang-analyzer.llvm.org/installation#OtherPlatforms
559install -d $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
d997b14b
AM
560# create launchers
561for f in scan-{build,view}; do
9556f4c9
ER
562 ln -s %{_libdir}/clang-analyzer/$f/$f $RPM_BUILD_ROOT%{_bindir}/$f
563 cp -pr tools/clang/tools/$f $RPM_BUILD_ROOT%{_libdir}/clang-analyzer
d997b14b 564done
41876fe7 565install -d $RPM_BUILD_ROOT%{_mandir}/man1
dd9350c7 566%{__mv} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/scan-build.1 $RPM_BUILD_ROOT%{_mandir}/man1
8132e62b
JB
567%py_comp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
568%py_ocomp $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-view
569%py_postclean %{_libdir}/clang-analyzer/scan-view
4ba3b2b3
JB
570# not this OS
571%{__rm} $RPM_BUILD_ROOT%{_libdir}/clang-analyzer/scan-build/*.bat
d997b14b 572
6df3b432
JB
573# not installed by cmake buildsystem
574install build/bin/clang-query $RPM_BUILD_ROOT%{_bindir}
575install build/bin/pp-trace $RPM_BUILD_ROOT%{_bindir}
576
b0068ae4 577%if %{with doc}
6df3b432 578cp -p build/docs/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
b883cf1e
JB
579# these tools are not installed
580%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/{FileCheck,llvm-build}.1
b0068ae4
JB
581# make links
582echo '.so llvm-ar.1' > $RPM_BUILD_ROOT%{_mandir}/man1/llvm-ranlib.1
dd9350c7
JB
583%endif
584
d997b14b 585# Move documentation back to build directory
2bbd0701 586%if %{with ocaml}
6df3b432
JB
587rm -rf ocamldocs
588mv $RPM_BUILD_ROOT%{_prefix}/docs/ocaml/html/html ocamldocs
2bbd0701 589%endif
9556f4c9
ER
590
591# and separate the apidoc
592%if %{with apidocs}
6df3b432
JB
593rm -rf clang-apidoc
594cp -a build/tools/clang/docs/html clang-apidoc
9556f4c9 595%endif
d997b14b
AM
596
597# And prepare Clang documentation
d997b14b 598rm -rf clang-docs
9556f4c9 599install -d clang-docs
827664e9 600for f in LICENSE.TXT NOTES.txt README.txt; do
9556f4c9 601 ln tools/clang/$f clang-docs
d997b14b 602done
021b3c3d 603
6832a5c5 604# Get rid of erroneously installed example files.
6df3b432
JB
605%{__rm} $RPM_BUILD_ROOT%{_libdir}/LLVMHello.so
606# test?
607%{__rm} $RPM_BUILD_ROOT%{_bindir}/llvm-c-test
608# not this OS
609%{__rm} $RPM_BUILD_ROOT%{_datadir}/clang/clang-format-bbedit.applescript
6832a5c5 610
aa11c230 611%clean
612rm -rf $RPM_BUILD_ROOT
613
8c514f23
JB
614%post libs -p /sbin/ldconfig
615%postun libs -p /sbin/ldconfig
aa11c230 616
5a7ac479
JB
617%post -n clang -p /sbin/ldconfig
618%postun -n clang -p /sbin/ldconfig
619
6df3b432
JB
620%post -n clang-tools-extra -p /sbin/ldconfig
621%postun -n clang-tools-extra -p /sbin/ldconfig
622
5a7ac479
JB
623%post -n lldb -p /sbin/ldconfig
624%postun -n lldb -p /sbin/ldconfig
625
aa11c230 626%files
627%defattr(644,root,root,755)
8132e62b 628%doc CREDITS.TXT LICENSE.TXT README.txt %{?with_tests:llvm-testlog.txt}
a9beeab5 629%attr(755,root,root) %{_bindir}/bugpoint
a9beeab5
JB
630%attr(755,root,root) %{_bindir}/llc
631%attr(755,root,root) %{_bindir}/lli
8132e62b
JB
632%attr(755,root,root) %{_bindir}/llvm-ar
633%attr(755,root,root) %{_bindir}/llvm-as
634%attr(755,root,root) %{_bindir}/llvm-bcanalyzer
827664e9 635%attr(755,root,root) %{_bindir}/llvm-cov
8132e62b
JB
636%attr(755,root,root) %{_bindir}/llvm-diff
637%attr(755,root,root) %{_bindir}/llvm-dis
4ba3b2b3 638%attr(755,root,root) %{_bindir}/llvm-dsymutil
827664e9 639%attr(755,root,root) %{_bindir}/llvm-dwarfdump
8132e62b 640%attr(755,root,root) %{_bindir}/llvm-extract
6df3b432 641%attr(755,root,root) %{_bindir}/llvm-lib
8132e62b 642%attr(755,root,root) %{_bindir}/llvm-link
3c402b7e 643%attr(755,root,root) %{_bindir}/llvm-lto
8132e62b 644%attr(755,root,root) %{_bindir}/llvm-mc
dd9350c7 645%attr(755,root,root) %{_bindir}/llvm-mcmarkup
8132e62b
JB
646%attr(755,root,root) %{_bindir}/llvm-nm
647%attr(755,root,root) %{_bindir}/llvm-objdump
b883cf1e 648%attr(755,root,root) %{_bindir}/llvm-profdata
8132e62b 649%attr(755,root,root) %{_bindir}/llvm-ranlib
f981d747 650%attr(755,root,root) %{_bindir}/llvm-readobj
827664e9
PS
651%attr(755,root,root) %{_bindir}/llvm-rtdyld
652%attr(755,root,root) %{_bindir}/llvm-size
f981d747 653%attr(755,root,root) %{_bindir}/llvm-stress
1628dc68 654%attr(755,root,root) %{_bindir}/llvm-symbolizer
827664e9 655%attr(755,root,root) %{_bindir}/llvm-tblgen
41876fe7
JR
656%attr(755,root,root) %{_bindir}/llvm-cxxdump
657%attr(755,root,root) %{_bindir}/llvm-pdbdump
a7973f21 658%attr(755,root,root) %{_bindir}/macho-dump
4ba3b2b3 659%attr(755,root,root) %{_bindir}/obj2yaml
8132e62b 660%attr(755,root,root) %{_bindir}/opt
4ba3b2b3
JB
661%attr(755,root,root) %{_bindir}/verify-uselistorder
662%attr(755,root,root) %{_bindir}/yaml2obj
b0068ae4 663%if %{with doc}
a9beeab5 664%{_mandir}/man1/bugpoint.1*
a7973f21 665%{_mandir}/man1/lit.1*
a9beeab5
JB
666%{_mandir}/man1/llc.1*
667%{_mandir}/man1/lli.1*
8132e62b
JB
668%{_mandir}/man1/llvm-ar.1*
669%{_mandir}/man1/llvm-as.1*
670%{_mandir}/man1/llvm-bcanalyzer.1*
f981d747 671%{_mandir}/man1/llvm-cov.1*
8132e62b
JB
672%{_mandir}/man1/llvm-diff.1*
673%{_mandir}/man1/llvm-dis.1*
b883cf1e 674%{_mandir}/man1/llvm-dwarfdump.1*
8132e62b 675%{_mandir}/man1/llvm-extract.1*
8132e62b
JB
676%{_mandir}/man1/llvm-link.1*
677%{_mandir}/man1/llvm-nm.1*
b883cf1e 678%{_mandir}/man1/llvm-profdata.1*
8132e62b 679%{_mandir}/man1/llvm-ranlib.1*
c999855f 680%{_mandir}/man1/llvm-readobj.1*
f981d747 681%{_mandir}/man1/llvm-stress.1*
1628dc68 682%{_mandir}/man1/llvm-symbolizer.1*
a9beeab5 683%{_mandir}/man1/opt.1*
dd9350c7 684%{_mandir}/man1/tblgen.1*
b0068ae4 685%endif
bc88141a 686
8c514f23
JB
687%files libs
688%defattr(644,root,root,755)
6df3b432
JB
689%attr(755,root,root) %{_libdir}/libLLVM*.so.%{version}
690%attr(755,root,root) %ghost %{_libdir}/libLLVM*.so.3.7
3c402b7e
JB
691%attr(755,root,root) %{_libdir}/libLTO.so.%{version}
692%attr(755,root,root) %ghost %{_libdir}/libLTO.so.3.7
8c514f23 693
bc88141a
ER
694%files devel
695%defattr(644,root,root,755)
696%attr(755,root,root) %{_bindir}/llvm-config
6df3b432 697%attr(755,root,root) %{_libdir}/libLLVM*.so
0a8510f2 698%attr(755,root,root) %{_libdir}/BugpointPasses.so
19f21eee 699%attr(755,root,root) %{_libdir}/libLTO.so
8132e62b
JB
700%{_includedir}/llvm
701%{_includedir}/llvm-c
b883cf1e
JB
702%dir %{_datadir}/llvm
703%{_datadir}/llvm/cmake
b0068ae4 704%if %{with doc}
8132e62b 705%{_mandir}/man1/llvm-config.1*
b0068ae4 706%endif
bc88141a 707
6df3b432
JB
708#%files doc
709#%defattr(644,root,root,755)
9556f4c9
ER
710
711%if %{with apidocs}
712%files apidocs
713%defattr(644,root,root,755)
714%doc apidoc/*
715%endif
716
b0068ae4
JB
717%if %{with polly}
718%files polly
719%defattr(644,root,root,755)
720%doc tools/polly/{CREDITS.txt,LICENSE.txt,README}
721%attr(755,root,root) %{_libdir}/LLVMPolly.so
6df3b432 722%attr(755,root,root) %{_libdir}/libPolly.so
b0068ae4
JB
723
724%files polly-devel
725%defattr(644,root,root,755)
b0068ae4
JB
726%{_includedir}/polly
727%endif
728
d997b14b 729%files -n clang
bc88141a 730%defattr(644,root,root,755)
827664e9 731%doc clang-docs/{LICENSE.TXT,NOTES.txt,README.txt} %{?with_tests:clang-testlog.txt}
8132e62b
JB
732%attr(755,root,root) %{_bindir}/clang
733%attr(755,root,root) %{_bindir}/clang++
6df3b432 734%attr(755,root,root) %{_bindir}/clang-3.7
dd9350c7 735%attr(755,root,root) %{_bindir}/clang-check
6df3b432 736%attr(755,root,root) %{_bindir}/clang-cl
1628dc68 737%attr(755,root,root) %{_bindir}/clang-format
6df3b432 738%attr(755,root,root) %{_bindir}/git-clang-format
5a7ac479
JB
739%dir %{_libdir}/clang
740%dir %{_libdir}/clang/%{version}
741%{_libdir}/clang/%{version}/include
742%if %{with rt}
c6c890ee 743%ifarch %{ix86} %{x8664}
6df3b432 744%{_libdir}/clang/%{version}/asan_blacklist.txt
9eefd942
JR
745%dir %{_libdir}/clang/%{version}/lib
746%dir %{_libdir}/clang/%{version}/lib/linux
747%endif
748%ifarch %{ix86}
749%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.a
750%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i*86.so
c6c890ee
JB
751%endif
752%ifarch %{x8664}
3c402b7e
JB
753%{_libdir}/clang/%{version}/dfsan_abilist.txt
754%{_libdir}/clang/%{version}/msan_blacklist.txt
9eefd942
JR
755%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a
756%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.so
f4c0e8bd 757%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-x86_64.a.syms
3c402b7e 758%endif
5a7ac479 759%endif
3c402b7e
JB
760%dir %{_datadir}/clang
761%{_datadir}/clang/clang-format-diff.py
d997b14b 762
87977e26
JR
763%files -n clang-libs
764%defattr(644,root,root,755)
765%attr(755,root,root) %{_libdir}/libclang.so.3.7
766%attr(755,root,root) %{_libdir}/libclang[A-Z]*.so.%{version}
767%attr(755,root,root) %ghost %{_libdir}/libclang[A-Z]*.so.3.7
768
589b92f5 769%if %{with rt} && %{with multilib}
9eefd942
JR
770%ifarch %{x8664}
771%files -n clang-multilib
772%defattr(644,root,root,755)
773%{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.a
774%attr(755,root,root) %{_libdir}/clang/%{version}/lib/linux/libclang_rt.*-i386.so
775%endif
776%endif
777
d997b14b 778%files -n clang-analyzer
bc88141a 779%defattr(644,root,root,755)
d997b14b
AM
780%attr(755,root,root) %{_bindir}/scan-build
781%attr(755,root,root) %{_bindir}/scan-view
dd9350c7 782%{_mandir}/man1/scan-build.1*
ae49e501 783%dir %{_libdir}/clang-analyzer
d997b14b 784
9556f4c9
ER
785%dir %{_libdir}/clang-analyzer/scan-build
786%{_libdir}/clang-analyzer/scan-build/*.css
787%{_libdir}/clang-analyzer/scan-build/*.js
788%attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/scan-build
789%attr(755,root,root) %{_libdir}/clang-analyzer/scan-build/*-analyzer
790
8132e62b
JB
791%dir %{_libdir}/clang-analyzer/scan-view
792%attr(755,root,root) %{_libdir}/clang-analyzer/scan-view/scan-view
793%{_libdir}/clang-analyzer/scan-view/Resources
794%{_libdir}/clang-analyzer/scan-view/*.py[co]
795
9556f4c9
ER
796%files -n clang-devel
797%defattr(644,root,root,755)
6df3b432 798%attr(755,root,root) %{_libdir}/libclang*.so
9556f4c9
ER
799%{_includedir}/clang
800%{_includedir}/clang-c
801
802%files -n clang-doc
803%defattr(644,root,root,755)
41876fe7 804%doc tools/clang/docs/*.{html,png,txt}
9556f4c9
ER
805
806%if %{with apidocs}
807%files -n clang-apidocs
808%defattr(644,root,root,755)
809%doc clang-apidoc/*
810%endif
811
b0068ae4
JB
812%files -n clang-tools-extra
813%defattr(644,root,root,755)
6df3b432 814%doc tools/clang/tools/extra/{CODE_OWNERS.TXT,README.txt} tools/clang/tools/extra/docs/_build/html/{*.html,*.js,_static}
b0068ae4
JB
815%attr(755,root,root) %{_bindir}/clang-apply-replacements
816%attr(755,root,root) %{_bindir}/clang-modernize
b883cf1e 817%attr(755,root,root) %{_bindir}/clang-query
4ba3b2b3 818%attr(755,root,root) %{_bindir}/clang-rename
b0068ae4
JB
819%attr(755,root,root) %{_bindir}/clang-tidy
820%attr(755,root,root) %{_bindir}/pp-trace
6df3b432
JB
821%attr(755,root,root) %{_libdir}/libmodernizeCore.so.%{version}
822%attr(755,root,root) %ghost %{_libdir}/libmodernizeCore.so.3.7
823# -devel?
824%attr(755,root,root) %{_libdir}/libmodernizeCore.so
b0068ae4 825
ba1cf74d
JB
826%files -n lld
827%defattr(644,root,root,755)
828%doc tools/lld/{LICENSE.TXT,README.md}
829%attr(755,root,root) %{_bindir}/lld
6df3b432
JB
830%attr(755,root,root) %{_libdir}/liblld[ACDEHMPRXY]*.so.%{version}
831%attr(755,root,root) %ghost %{_libdir}/liblld[ACDEHMPRXY]*.so.3.7
ba1cf74d
JB
832
833%files -n lld-devel
834%defattr(644,root,root,755)
6df3b432 835%attr(755,root,root) %{_libdir}/liblld[ACDEHMPRXY]*.so
ba1cf74d
JB
836%{_includedir}/lld
837
5a7ac479
JB
838%if %{with lldb}
839%files -n lldb
840%defattr(644,root,root,755)
6df3b432 841%attr(755,root,root) %{_bindir}/argdumper
5a7ac479 842%attr(755,root,root) %{_bindir}/lldb
6df3b432 843%attr(755,root,root) %{_bindir}/lldb-%{version}
b883cf1e 844%attr(755,root,root) %{_bindir}/lldb-mi
6df3b432
JB
845%attr(755,root,root) %{_bindir}/lldb-mi-%{version}
846%attr(755,root,root) %{_bindir}/lldb-server
847%attr(755,root,root) %{_bindir}/lldb-server-%{version}
848%attr(755,root,root) %{_libdir}/liblldb.so.%{version}
849%attr(755,root,root) %ghost %{_libdir}/liblldb.so.3.7
b883cf1e 850%dir %{py_sitedir}/lldb
41876fe7 851%attr(755,root,root) %{py_sitedir}/lldb/argdumper
6df3b432
JB
852%{py_sitedir}/lldb/formatters
853%{py_sitedir}/lldb/runtime
854%{py_sitedir}/lldb/utils
855%{py_sitedir}/lldb/__init__.py[co]
856%{py_sitedir}/lldb/embedded_interpreter.py[co]
b883cf1e
JB
857%attr(755,root,root) %{py_sitedir}/lldb/_lldb.so
858%attr(755,root,root) %{py_sitedir}/readline.so
5a7ac479
JB
859
860%files -n lldb-devel
861%defattr(644,root,root,755)
6df3b432 862%attr(755,root,root) %{_libdir}/liblldb.so
5a7ac479
JB
863%{_libdir}/liblldb*.a
864%{_includedir}/lldb
865%endif
866
9556f4c9 867%if %{with ocaml}
d997b14b
AM
868%files ocaml
869%defattr(644,root,root,755)
11b6f380
JB
870%{_libdir}/ocaml/META.llvm*
871%attr(755,root,root) %{_libdir}/ocaml/dllllvm*.so
8132e62b
JB
872%{_libdir}/ocaml/llvm*.cma
873%{_libdir}/ocaml/llvm*.cmi
d997b14b
AM
874
875%files ocaml-devel
876%defattr(644,root,root,755)
8132e62b
JB
877%{_libdir}/ocaml/libllvm*.a
878%{_libdir}/ocaml/llvm*.a
879%{_libdir}/ocaml/llvm*.cmx*
9556f4c9
ER
880
881%files ocaml-doc
882%defattr(644,root,root,755)
6df3b432 883%doc ocamldocs/*
9556f4c9 884%endif
This page took 0.233216 seconds and 4 git commands to generate.