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