source: general/prog/llvm.xml@ bb85b39

systemd-13485
Last change on this file since bb85b39 was a91856d1, checked in by Douglas R. Reno <renodr@…>, 8 years ago

Typo fixes
Tags
Changelog: fix dates for the year 2016.
Boost: Add recommended dependency which
ICU: Add optional dependency doxygen

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@17001 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 22.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY llvm-download-http "http://llvm.org/releases/&llvm-version;/llvm-&llvm-version;.src.tar.xz">
8 <!ENTITY llvm-download-ftp " ">
9 <!ENTITY llvm-md5sum "bf8b3a2c79e61212c5409041dfdbd319">
10 <!ENTITY llvm-size "14 MB">
11 <!ENTITY llvm-buildsize "1.6 GB (with Clang and tests)">
12 <!ENTITY llvm-time "13 SBU (with Clang, tests and parallelism = 4)">
13
14 <!ENTITY clang-download-http "http://llvm.org/releases/&llvm-version;/cfe-&llvm-version;.src.tar.xz">
15 <!ENTITY clang-md5sum "0acd026b5529164197563d135a8fd83e">
16 <!ENTITY clang-size " 8.7 MB">
17
18 <!ENTITY rt-version "&llvm-version;">
19 <!ENTITY compiler-rt-download-http "http://llvm.org/releases/&rt-version;/compiler-rt-&rt-version;.src.tar.xz">
20 <!ENTITY compiler-rt-md5sum "1c6975daf30bb3b0473b53c3a1a6ff01">
21 <!ENTITY compiler-rt-size "1.2 MB">
22]>
23
24<sect1 id="llvm" xreflabel="LLVM-&llvm-version;">
25 <?dbhtml filename="llvm.html" ?>
26
27 <sect1info>
28 <othername>$LastChangedBy$</othername>
29 <date>$Date$</date>
30 </sect1info>
31
32 <title>LLVM-&llvm-version;</title>
33
34 <indexterm zone="llvm">
35 <primary sortas="a-LLVM">LLVM</primary>
36 </indexterm>
37
38 <sect2 role="package">
39 <title>Introduction to LLVM</title>
40
41 <para>
42 The <application>LLVM</application> package contains a collection of
43 modular and reusable compiler and toolchain technologies. The Low Level
44 Virtual Machine (LLVM) Core libraries provide a modern source and
45 target-independent optimizer, along with code generation support for many
46 popular CPUs (as well as some less common ones!). These libraries are
47 built around a well specified code representation known as the LLVM
48 intermediate representation ("LLVM IR").
49 </para>
50
51 <para>
52 The optional <application>Clang</application> and <application>Compiler
53 RT</application> packages provide new C, C++, Objective C and Objective
54 C++ front-ends and runtime libraries for the
55 <application>LLVM</application>.
56 </para>
57
58 <note>
59 <para>
60 This package hits a bug in GCC-4.9.0 or an unpatched GCC-4.9.1.
61 To build this package, GCC needs to be updated if you have one of
62 these versions. See <xref linkend="gcc"/>
63 for <application>gcc</application> installation instructions.
64 </para>
65 </note>
66
67 &lfs79_checked;
68
69 <bridgehead renderas="sect3">Package Information</bridgehead>
70 <itemizedlist spacing="compact">
71 <listitem>
72 <para>
73 Download (HTTP): <ulink url="&llvm-download-http;"/>
74 </para>
75 </listitem>
76 <listitem>
77 <para>
78 Download (FTP): <ulink url="&llvm-download-ftp;"/>
79 </para>
80 </listitem>
81 <listitem>
82 <para>
83 Download MD5 sum: &llvm-md5sum;
84 </para>
85 </listitem>
86 <listitem>
87 <para>
88 Download size: &llvm-size;
89 </para>
90 </listitem>
91 <listitem>
92 <para>
93 Estimated disk space required: &llvm-buildsize;
94 </para>
95 </listitem>
96 <listitem>
97 <para>
98 Estimated build time: &llvm-time;
99 </para>
100 </listitem>
101 </itemizedlist>
102
103 <bridgehead renderas="sect3">Optional Downloads</bridgehead>
104
105 <bridgehead renderas="sect4">Clang</bridgehead>
106 <itemizedlist spacing="compact">
107 <listitem>
108 <para>
109 Download: <ulink url="&clang-download-http;"/>
110 </para>
111 </listitem>
112 <listitem>
113 <para>
114 Download MD5 sum: &clang-md5sum;
115 </para>
116 </listitem>
117 <listitem>
118 <para>
119 Download size: &clang-size;
120 </para>
121 </listitem>
122 </itemizedlist>
123
124 <bridgehead renderas="sect4">Compiler RT</bridgehead>
125 <itemizedlist spacing="compact">
126 <listitem>
127 <para>
128 Download: <ulink url="&compiler-rt-download-http;"/>
129 </para>
130 </listitem>
131 <listitem>
132 <para>
133 Download MD5 sum: &compiler-rt-md5sum;
134 </para>
135 </listitem>
136 <listitem>
137 <para>
138 Download size: &compiler-rt-size;
139 </para>
140 </listitem>
141 </itemizedlist>
142
143 <bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
144
145 <bridgehead renderas="sect4">Recommended</bridgehead>
146 <para role="recommended">
147 <xref linkend="libffi"/> and
148 <xref linkend="python2"/>
149 </para>
150
151 <bridgehead renderas="sect4">Optional</bridgehead>
152 <para role="optional">
153 <xref linkend="cmake"/>,
154 <xref linkend="doxygen"/>,
155 <xref linkend="graphviz"/>,
156 <xref linkend="libxml2"/>,
157 <xref linkend="texlive"/> (or <xref linkend="tl-installer"/>),
158 <xref linkend="valgrind"/>,
159 <xref linkend="zip"/>,
160 <ulink url="http://www.ocaml.org/">OCaml</ulink>, and
161 <ulink url="http://pypi.python.org/pypi/Sphinx">Sphinx</ulink>
162 </para>
163
164 <para condition="html" role="usernotes">User Notes:
165 <ulink url="&blfs-wiki;/llvm"/>
166 </para>
167 </sect2>
168
169 <sect2 role="installation">
170 <title>Installation of LLVM</title>
171
172 <para>
173 If you have downloaded the optional packages, install them into
174 the source tree by running the following commands:
175 </para>
176
177<screen><userinput>tar -xf ../cfe-&llvm-version;.src.tar.xz -C tools &amp;&amp;
178tar -xf ../compiler-rt-&rt-version;.src.tar.xz -C projects &amp;&amp;
179
180mv tools/cfe-&llvm-version;.src tools/clang &amp;&amp;
181mv projects/compiler-rt-&rt-version;.src projects/compiler-rt</userinput></screen>
182
183<!-- Only for 3.7.0: hopefully fixed on later versions -->
184 <para>
185 The run-time library needs to be fixed for 32 bit installations:
186 </para>
187
188<screen><userinput>sed -r "/ifeq.*CompilerTargetArch/s#i386#i686#g" \
189 -i projects/compiler-rt/make/platform/clang_linux.mk</userinput></screen>
190
191 <para>
192 Install <application>LLVM</application> by running the following
193 commands:
194 </para>
195
196<screen><userinput>sed -e "s:/docs/llvm:/share/doc/llvm-&llvm-version;:" \
197 -i Makefile.config.in &amp;&amp;
198
199mkdir -v build &amp;&amp;
200cd build &amp;&amp;
201
202CC=gcc CXX=g++ \
203../configure --prefix=/usr \
204 --datarootdir=/usr/share \
205 --sysconfdir=/etc \
206 --enable-libffi \
207 --enable-optimized \
208 --enable-shared \
209 --enable-targets=host,r600 \
210 --disable-assertions \
211 --docdir=/usr/share/doc/llvm-&llvm-version; &amp;&amp;
212make</userinput></screen>
213
214 <para>
215 If you have installed <application>Sphinx</application> and wish
216 to generate manual pages, issue the following command:
217 </para>
218
219<screen><userinput>make -C ../docs -f Makefile.sphinx man</userinput></screen>
220
221<!-- The note about some tests failing for unknown reasons can be removed.
222These are my results:
223Expected Passes: 22242
224Expected Failures: 111
225-->
226
227 <para>
228 To test the results, issue: <command>make -k check-all</command>.
229 </para>
230
231 <para>
232 Now, as the <systemitem class="username">root</systemitem> user:
233 </para>
234
235<screen role="root"><userinput>make install &amp;&amp;
236
237for file in /usr/lib/lib{clang,LLVM,LTO}*.a
238do
239 test -f $file &amp;&amp; chmod -v 644 $file
240done
241unset file</userinput></screen>
242
243 <para>
244 If you had <xref linkend="python2"/> installed and you have
245 built <application>Clang</application>, install the
246 <application>Clang Analyzer</application> by running the
247 following command as the
248 <systemitem class="username">root</systemitem> user:
249 </para>
250
251<screen role="root"><userinput>install -v -dm755 /usr/lib/clang-analyzer &amp;&amp;
252
253for prog in scan-build scan-view
254do
255 cp -rfv ../tools/clang/tools/$prog /usr/lib/clang-analyzer/ &amp;&amp;
256 ln -sfv ../lib/clang-analyzer/$prog/$prog /usr/bin/
257done
258unset prog &amp;&amp;
259
260ln -sfv /usr/bin/clang \
261 /usr/lib/clang-analyzer/scan-build/ &amp;&amp;
262mv -v /usr/lib/clang-analyzer/scan-build/scan-build.1 \
263 /usr/share/man/man1/</userinput></screen>
264
265 <para>
266 If you have built manual pages, install them by running the
267 following command as the
268 <systemitem class="username">root</systemitem> user:
269 </para>
270
271<screen role="root"><userinput>install -v -m644 ../docs/_build/man/* /usr/share/man/man1/</userinput></screen>
272
273 </sect2>
274
275 <sect2 role="commands">
276 <title>Command Explanations</title>
277
278 <para>
279 <command>sed -e ... Makefile.config.in</command>: This sed fixes
280 location of the installed documentation.
281 </para>
282
283 <para>
284 <parameter>--enable-libffi</parameter>: This switch enables
285 <application>LLVM</application> to use
286 <application>libffi</application>. Remove if you did not
287 install <application>libffi</application>.
288 </para>
289
290 <para>
291 <parameter>--enable-optimized</parameter>: This switch enables
292 compiler optimizations in order to speed up the code and reduce
293 its size.
294 </para>
295
296 <para>
297 <parameter>--enable-shared</parameter>: This switch enables
298 building of the <application>LLVM</application> shared
299 library which contains all of the static libraries linked into
300 a single library.
301 </para>
302
303 <para>
304 <parameter>--enable-targets=host,r600</parameter>: This switch enables
305 building for the same target as the host, and also for the r600 AMD GPU
306 used by the Mesa r600 and radeonsi drivers. Default is all. You can use
307 a comma separated list. Valid targets are: host, x86, x86_64, sparc,
308 powerpc, arm64, arm, aarch64, mips, hexagon, xcore, msp430, nvptx,
309 systemz, r600, amdgpu (equivalent to r600), bpf, wasm, and cpp.
310 </para>
311
312 <para>
313 <parameter>--disable-assertions</parameter>: Disable some compile checks,
314 which are not necessary on a production system.
315 </para>
316
317 </sect2>
318
319 <sect2 role="content">
320 <title>Contents</title>
321
322 <segmentedlist>
323 <segtitle>Installed Programs</segtitle>
324 <segtitle>Installed Libraries</segtitle>
325 <segtitle>Installed Directories</segtitle>
326
327 <seglistitem>
328 <seg>
329 bugpoint, c-index-test, clang, clang++ (symlink), count, FileCheck,
330 clang-check, clang-format, clang-tblgen, llc, lli, lli-child-target,
331 llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov,
332 llvm-cxxdump, llvm-diff, llvm-dis, llvm-dsymutil, llvm-dwarfdump,
333 llvm-extract, llvm-link, llvm-mc, llvm-mcmarkup, llvm-nm,
334 llvm-objdump, llvm-pdbdump, llvm-profdata, llvm-ranlib (symlink),
335 llvm-readobj, llvm-rtdyld, llvm-size, llvm-stress, llvm-symbolizer,
336 llvm-tblgen, macho-dump, not, obj2yaml, opt, scan-build (symlink),
337 scan-view (symlink), verify-uselistorder, and yaml2obj
338 </seg>
339 <seg>
340 BugpointPasses.so, libclang.so, libLLVM-&llvm-version;.so,
341 libLTO.so,<!-- libprofile_rt.so,--> LLVMHello.so and numerous
342 static libraries in /usr/lib
343 </seg>
344 <seg>
345 /usr/include/{clang,clang-c,llvm,llvm-c},
346 /usr/lib/{clang,clang-analyzer}, and
347 /usr/share/{doc/llvm-&llvm-version;,llvm}
348 </seg>
349 </seglistitem>
350 </segmentedlist>
351
352 <variablelist>
353 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
354 <?dbfo list-presentation="list"?>
355 <?dbhtml list-presentation="table"?>
356
357 <varlistentry id="bugpoint">
358 <term><command>bugpoint</command></term>
359 <listitem>
360 <para>
361 is the automatic test case reduction tool.
362 </para>
363 <indexterm zone="llvm bugpoint">
364 <primary sortas="b-bugpoint">bugpoint</primary>
365 </indexterm>
366 </listitem>
367 </varlistentry>
368
369 <varlistentry id="clang">
370 <term><command>clang</command></term>
371 <listitem>
372 <para>
373 is the <application>Clang</application> C, C++,
374 and Objective-C compiler.
375 </para>
376 <indexterm zone="llvm clang">
377 <primary sortas="b-clang">clang</primary>
378 </indexterm>
379 </listitem>
380 </varlistentry>
381
382 <varlistentry id="llc">
383 <term><command>llc</command></term>
384 <listitem>
385 <para>
386 is the <application>LLVM</application> static compiler.
387 </para>
388 <indexterm zone="llvm llc">
389 <primary sortas="b-llc">llc</primary>
390 </indexterm>
391 </listitem>
392 </varlistentry>
393
394 <varlistentry id="lli">
395 <term><command>lli</command></term>
396 <listitem>
397 <para>
398 is used to directly execute programs from
399 <application>LLVM</application> bitcode.
400 </para>
401 <indexterm zone="llvm lli">
402 <primary sortas="b-lli">lli</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="llvm-ar">
408 <term><command>llvm-ar</command></term>
409 <listitem>
410 <para>
411 is the <application>LLVM</application> archiver.
412 </para>
413 <indexterm zone="llvm llvm-ar">
414 <primary sortas="b-llvm-ar">llvm-ar</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 <varlistentry id="llvm-as">
420 <term><command>llvm-as</command></term>
421 <listitem>
422 <para>
423 is the <application>LLVM</application> assembler.
424 </para>
425 <indexterm zone="llvm llvm-as">
426 <primary sortas="b-llvm-as">llvm-as</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry id="llvm-bcanalyzer">
432 <term><command>llvm-bcanalyzer</command></term>
433 <listitem>
434 <para>
435 is the <application>LLVM</application> bitcode analyzer.
436 </para>
437 <indexterm zone="llvm llvm-bcanalyzer">
438 <primary sortas="b-llvm-bcanalyzer">llvm-bcanalyzer</primary>
439 </indexterm>
440 </listitem>
441 </varlistentry>
442
443 <varlistentry id="llvm-config">
444 <term><command>llvm-config</command></term>
445 <listitem>
446 <para>
447 Prints <application>LLVM</application> compilation options.
448 </para>
449 <indexterm zone="llvm llvm-config">
450 <primary sortas="b-llvm-config">llvm-config</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 <varlistentry id="llvm-cov">
456 <term><command>llvm-cov</command></term>
457 <listitem>
458 <para>
459 is used to emit coverage information.
460 </para>
461 <indexterm zone="llvm llvm-cov">
462 <primary sortas="b-llvm-cov">llvm-cov</primary>
463 </indexterm>
464 </listitem>
465 </varlistentry>
466
467 <varlistentry id="llvm-cxxdump">
468 <term><command>llvm-cxxdump</command></term>
469 <listitem>
470 <para>
471 is used as a C++ ABI Data Dumper.
472 </para>
473 <indexterm zone="llvm llvm-cxxdump">
474 <primary sortas="b-llvm-cxxdump">llvm-cxxdump</primary>
475 </indexterm>
476 </listitem>
477 </varlistentry>
478
479 <varlistentry id="llvm-diff">
480 <term><command>llvm-diff</command></term>
481 <listitem>
482 <para>
483 is the <application>LLVM</application> structural
484 '<command>diff</command>'.
485 </para>
486 <indexterm zone="llvm llvm-diff">
487 <primary sortas="b-llvm-diff">llvm-diff</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="llvm-dis">
493 <term><command>llvm-dis</command></term>
494 <listitem>
495 <para>
496 is the <application>LLVM</application> disassembler.
497 </para>
498 <indexterm zone="llvm llvm-dis">
499 <primary sortas="b-llvm-dis">llvm-dis</primary>
500 </indexterm>
501 </listitem>
502 </varlistentry>
503
504 <varlistentry id="llvm-dsymutil">
505 <term><command>llvm-dsymutil</command></term>
506 <listitem>
507 <para>
508 is a tool used to manipulate archived DWARF debug symbol files,
509 compatible with the Darwin command <command>dsymutil</command>.
510 </para>
511 <indexterm zone="llvm llvm-dsymutil">
512 <primary sortas="b-llvm-dsymutil">llvm-dsymutil</primary>
513 </indexterm>
514 </listitem>
515 </varlistentry>
516
517 <varlistentry id="llvm-extract">
518 <term><command>llvm-extract</command></term>
519 <listitem>
520 <para>
521 is used to extract a function from an
522 <application>LLVM</application> module.
523 </para>
524 <indexterm zone="llvm llvm-extract">
525 <primary sortas="b-llvm-extract">llvm-extract</primary>
526 </indexterm>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry id="llvm-link">
531 <term><command>llvm-link</command></term>
532 <listitem>
533 <para>
534 is the <application>LLVM</application> linker.
535 </para>
536 <indexterm zone="llvm llvm-link">
537 <primary sortas="b-llvm-link">llvm-link</primary>
538 </indexterm>
539 </listitem>
540 </varlistentry>
541
542 <varlistentry id="llvm-nm">
543 <term><command>llvm-nm</command></term>
544 <listitem>
545 <para>
546 is used to list <application>LLVM</application> bitcode
547 and an object file's symbol table.
548 </para>
549 <indexterm zone="llvm llvm-nm">
550 <primary sortas="b-llvm-nm">llvm-nm</primary>
551 </indexterm>
552 </listitem>
553 </varlistentry>
554
555 <varlistentry id="llvm-pdbdump">
556 <term><command>llvm-pdbdump</command></term>
557 <listitem>
558 <para>
559 is used as a PDB Dumper.
560 </para>
561 <indexterm zone="llvm llvm-pdbdump">
562 <primary sortas="b-llvm-pdbdump">llvm-pdbdump</primary>
563 </indexterm>
564 </listitem>
565 </varlistentry>
566<!--
567 <varlistentry id="llvm-prof">
568 <term><command>llvm-prof</command></term>
569 <listitem>
570 <para>
571 is used to print execution profile of
572 <application>LLVM</application> program.
573 </para>
574 <indexterm zone="llvm llvm-prof">
575 <primary sortas="b-llvm-prof">llvm-prof</primary>
576 </indexterm>
577 </listitem>
578 </varlistentry>-->
579
580 <varlistentry id="llvm-ranlib">
581 <term><command>llvm-ranlib</command></term>
582 <listitem>
583 <para>
584 is used to generate an index for a <application>LLVM</application>
585 archive.
586 </para>
587 <indexterm zone="llvm llvm-ranlib">
588 <primary sortas="b-llvm-ranlib">llvm-ranlib</primary>
589 </indexterm>
590 </listitem>
591 </varlistentry>
592
593 <varlistentry id="llvm-stress">
594 <term><command>llvm-stress</command></term>
595 <listitem>
596 <para>
597 is used to generate random
598 <filename class="extension">.ll</filename> files.
599 </para>
600 <indexterm zone="llvm llvm-stress">
601 <primary sortas="b-llvm-stress">llvm-stress</primary>
602 </indexterm>
603 </listitem>
604 </varlistentry>
605
606 <varlistentry id="llvm-tblgen">
607 <term><command>llvm-tblgen</command></term>
608 <listitem>
609 <para>
610 is the <application>LLVM</application> Target Description
611 To C++ Code Generator.
612 </para>
613 <indexterm zone="llvm llvm-tblgen">
614 <primary sortas="b-llvm-tblgen">llvm-tblgen</primary>
615 </indexterm>
616 </listitem>
617 </varlistentry>
618
619 <varlistentry id="obj2yaml">
620 <term><command>obj2yaml</command></term>
621 <listitem>
622 <para>
623 takes an object file,and produces a YAML representation of the
624 file.
625 </para>
626 <indexterm zone="llvm obj2yaml">
627 <primary sortas="b-obj2yaml">obj2yaml</primary>
628 </indexterm>
629 </listitem>
630 </varlistentry>
631
632 <varlistentry id="opt">
633 <term><command>opt</command></term>
634 <listitem>
635 <para>
636 is the <application>LLVM</application> optimizer.
637 </para>
638 <indexterm zone="llvm opt">
639 <primary sortas="b-opt">opt</primary>
640 </indexterm>
641 </listitem>
642 </varlistentry>
643
644 <varlistentry id="scan-build">
645 <term><command>scan-build</command></term>
646 <listitem>
647 <para>
648 is a <application>Perl</application> script that invokes the
649 <application>Clang</application> static analyzer.
650 </para>
651 <indexterm zone="llvm scan-build">
652 <primary sortas="b-scan-build">scan-build</primary>
653 </indexterm>
654 </listitem>
655 </varlistentry>
656
657 <varlistentry id="yaml2obj">
658 <term><command>yaml2obj</command></term>
659 <listitem>
660 <para>
661 takes a YAML representation of an object file and converts it
662 to an binary file.
663 </para>
664 <indexterm zone="llvm yaml2obj">
665 <primary sortas="b-yaml2obj">yaml2obj</primary>
666 </indexterm>
667 </listitem>
668 </varlistentry>
669
670 <varlistentry id="libllvm">
671 <term><filename class="libraryfile">libLLVM-&llvm-version;.so</filename></term>
672 <listitem>
673 <para>
674 contains the <application>LLVM</application> API functions.
675 </para>
676 <indexterm zone="llvm libllvm">
677 <primary sortas="c-libllvm">libLLVM-&llvm-version;.so</primary>
678 </indexterm>
679 </listitem>
680 </varlistentry>
681<!--
682 <varlistentry id="libprofile_rt">
683 <term><filename class="libraryfile">libprofile_rt.so</filename></term>
684 <listitem>
685 <para>
686 is the C, C++ and Objective-C runtime library for
687 <application>Clang</application>.
688 </para>
689 <indexterm zone="llvm libprofile_rt">
690 <primary sortas="c-libprofile_rt">libprofile_rt.so</primary>
691 </indexterm>
692 </listitem>
693 </varlistentry>-->
694
695 </variablelist>
696
697 </sect2>
698
699</sect1>
Note: See TracBrowser for help on using the repository browser.