source: general/prog/llvm.xml@ a85c6ce

10.0 10.1 11.0 7.10 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus nosym perl-modules qt5new trunk upgradedb xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since a85c6ce was a85c6ce, checked in by Bruce Dubbs <bdubbs@…>, 7 years ago

Some formatting changes and make a couple of instructions optional.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@15386 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.9 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 "2d3d8004f38852aa679e5945b8ce0b14">
10 <!ENTITY llvm-size "12 MB">
11 <!ENTITY llvm-buildsize "618 MB (1.2 GB with Clang) and 78 MB for the tests">
12 <!ENTITY llvm-time "6.5 SBU - using parallelism=4 (12 SBU with Clang - using parallelism=4) and 0.3 for tests">
13
14 <!ENTITY clang-download-http "http://llvm.org/releases/&llvm-version;/cfe-&llvm-version;.src.tar.xz">
15 <!ENTITY clang-md5sum "93f9532f8f7e6f1d8e5c1116907051cb">
16 <!ENTITY clang-size "7.9 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 "d626cfb8a9712cb92b820798ab5bc1f8">
21 <!ENTITY compiler-rt-size "1.1 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 a 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 &lfs76_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 <para>
184 Install <application>LLVM</application> by running the following
185 commands:
186 </para>
187
188<screen><userinput>sed -e "s:/docs/llvm:/share/doc/llvm-&llvm-version;:" \
189 -i Makefile.config.in &amp;&amp;
190
191CC=gcc CXX=g++ \
192./configure --prefix=/usr \
193 --sysconfdir=/etc \
194 --enable-libffi \
195 --enable-optimized \
196 --enable-shared \
197 --disable-assertions &amp;&amp;
198make</userinput></screen>
199
200 <para>
201 If you have installed <application>Sphinx</application> and wish
202 to generate manual pages, issue the following command:
203 </para>
204
205<screen><userinput>make -C docs -f Makefile.sphinx man</userinput></screen>
206
207 <para>
208 To test the results, issue: <command>make check</command>.
209 </para>
210
211 <para>
212 Now, as the <systemitem class="username">root</systemitem> user:
213 </para>
214
215<screen role="root"><userinput>make install &amp;&amp;
216
217for file in /usr/lib/lib{clang,LLVM,LTO}*.a
218do
219 test -f $file &amp;&amp; chmod -v 644 $file
220done</userinput></screen>
221
222 <para>
223 If you had <xref linkend="python2"/> installed and you have
224 built <application>Clang</application>, install the
225 <application>Clang Analyzer</application> by running the
226 following command as the
227 <systemitem class="username">root</systemitem> user:
228 </para>
229
230<screen role="root"><userinput>install -v -dm755 /usr/lib/clang-analyzer &amp;&amp;
231for prog in scan-build scan-view
232do
233 cp -rfv tools/clang/tools/$prog /usr/lib/clang-analyzer/
234 ln -sfv ../lib/clang-analyzer/$prog/$prog /usr/bin/
235done &amp;&amp;
236ln -sfv /usr/bin/clang /usr/lib/clang-analyzer/scan-build/ &amp;&amp;
237mv -v /usr/lib/clang-analyzer/scan-build/scan-build.1 /usr/share/man/man1/</userinput></screen>
238
239 <para>
240 If you have built manual pages, install them by running the
241 following command as the
242 <systemitem class="username">root</systemitem> user:
243 </para>
244
245<screen role="root"><userinput>install -v -m644 docs/_build/man/* /usr/share/man/man1/</userinput></screen>
246
247 </sect2>
248
249 <sect2 role="commands">
250 <title>Command Explanations</title>
251
252 <para>
253 <command>sed -e ... Makefile.config.in</command>: This sed fixes
254 location of the installed documentation.
255 </para>
256
257 <para>
258 <parameter>--enable-libffi</parameter>: This switch enables
259 <application>LLVM</application> to use
260 <application>libffi</application>. Remove if you did not
261 install <application>libffi</application>.
262 </para>
263
264 <para>
265 <parameter>--enable-optimized</parameter>: This switch enables
266 compiler optimizations in order to speed up the code and reduce
267 its size.
268 </para>
269
270 <para>
271 <parameter>--enable-shared</parameter>: This switch enables
272 building of the <application>LLVM</application> shared
273 library which contains all of static libraries linked into
274 single library.
275 </para>
276
277 <para>
278 <parameter>--disable-assertions</parameter>: Disable some compile checks,
279 not necessary on a production system.
280 </para>
281
282 </sect2>
283
284 <sect2 role="content">
285 <title>Contents</title>
286
287 <segmentedlist>
288 <segtitle>Installed Programs</segtitle>
289 <segtitle>Installed Libraries</segtitle>
290 <segtitle>Installed Directories</segtitle>
291
292 <seglistitem>
293 <seg>
294 bugpoint, c-index-test, clang, clang++ (symlink), count, FileCheck,
295 clang-check, clang-format, clang-tblgen, llc, lli, lli-child-target,
296 llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov, llvm-diff,
297 llvm-dis, llvm-dwarfdump, llvm-extract, llvm-link, llvm-mc,
298 llvm-mcmarkup, llvm-nm, llvm-objdump, llvm-profdata, llvm-ranlib
299 (symlink), llvm-readobj, llvm-rtdyld, llvm-size, llvm-stress,
300 llvm-symbolizer, llvm-tblgen, macho-dump, not, opt, scan-build
301 (symlink), and scan-view (symlink)
302 </seg>
303 <seg>
304 BugpointPasses.so, libclang.so, libLLVM-&llvm-version;.so,
305 libLTO.so,<!-- libprofile_rt.so,--> LLVMHello.so and numerous
306 static libraries in /usr/lib
307 </seg>
308 <seg>
309 /usr/include/{clang,clang-c,llvm,llvm-c},
310 /usr/lib/{clang,clang-analyzer},
311 /usr/share/doc/llvm-&llvm-version;,
312 and /usr/share/llvm
313 </seg>
314 </seglistitem>
315 </segmentedlist>
316
317 <variablelist>
318 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
319 <?dbfo list-presentation="list"?>
320 <?dbhtml list-presentation="table"?>
321
322 <varlistentry id="bugpoint">
323 <term><command>bugpoint</command></term>
324 <listitem>
325 <para>
326 is the automatic test case reduction tool.
327 </para>
328 <indexterm zone="llvm bugpoint">
329 <primary sortas="b-bugpoint">bugpoint</primary>
330 </indexterm>
331 </listitem>
332 </varlistentry>
333
334 <varlistentry id="clang">
335 <term><command>clang</command></term>
336 <listitem>
337 <para>
338 is the <application>Clang</application> C, C++,
339 and Objective-C compiler.
340 </para>
341 <indexterm zone="llvm clang">
342 <primary sortas="b-clang">clang</primary>
343 </indexterm>
344 </listitem>
345 </varlistentry>
346
347 <varlistentry id="llc">
348 <term><command>llc</command></term>
349 <listitem>
350 <para>
351 is the <application>LLVM</application> static compiler.
352 </para>
353 <indexterm zone="llvm llc">
354 <primary sortas="b-llc">llc</primary>
355 </indexterm>
356 </listitem>
357 </varlistentry>
358
359 <varlistentry id="lli">
360 <term><command>lli</command></term>
361 <listitem>
362 <para>
363 is used to directly execute programs from
364 <application>LLVM</application> bitcode.
365 </para>
366 <indexterm zone="llvm lli">
367 <primary sortas="b-lli">lli</primary>
368 </indexterm>
369 </listitem>
370 </varlistentry>
371
372 <varlistentry id="llvm-ar">
373 <term><command>llvm-ar</command></term>
374 <listitem>
375 <para>
376 is the <application>LLVM</application> archiver.
377 </para>
378 <indexterm zone="llvm llvm-ar">
379 <primary sortas="b-llvm-ar">llvm-ar</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="llvm-as">
385 <term><command>llvm-as</command></term>
386 <listitem>
387 <para>
388 is the <application>LLVM</application> assembler.
389 </para>
390 <indexterm zone="llvm llvm-as">
391 <primary sortas="b-llvm-as">llvm-as</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="llvm-bcanalyzer">
397 <term><command>llvm-bcanalyzer</command></term>
398 <listitem>
399 <para>
400 is the <application>LLVM</application> bitcode analyzer.
401 </para>
402 <indexterm zone="llvm llvm-bcanalyzer">
403 <primary sortas="b-llvm-bcanalyzer">llvm-bcanalyzer</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="llvm-config">
409 <term><command>llvm-config</command></term>
410 <listitem>
411 <para>
412 Prints <application>LLVM</application> compilation options.
413 </para>
414 <indexterm zone="llvm llvm-config">
415 <primary sortas="b-llvm-config">llvm-config</primary>
416 </indexterm>
417 </listitem>
418 </varlistentry>
419
420 <varlistentry id="llvm-cov">
421 <term><command>llvm-cov</command></term>
422 <listitem>
423 <para>
424 is used to emit coverage information.
425 </para>
426 <indexterm zone="llvm llvm-cov">
427 <primary sortas="b-llvm-cov">llvm-cov</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 <varlistentry id="llvm-diff">
433 <term><command>llvm-diff</command></term>
434 <listitem>
435 <para>
436 is the <application>LLVM</application> structural
437 '<command>diff</command>'.
438 </para>
439 <indexterm zone="llvm llvm-diff">
440 <primary sortas="b-llvm-diff">llvm-diff</primary>
441 </indexterm>
442 </listitem>
443 </varlistentry>
444
445 <varlistentry id="llvm-dis">
446 <term><command>llvm-dis</command></term>
447 <listitem>
448 <para>
449 is the <application>LLVM</application> disassembler.
450 </para>
451 <indexterm zone="llvm llvm-dis">
452 <primary sortas="b-llvm-dis">llvm-dis</primary>
453 </indexterm>
454 </listitem>
455 </varlistentry>
456
457 <varlistentry id="llvm-extract">
458 <term><command>llvm-extract</command></term>
459 <listitem>
460 <para>
461 is used to extract a function from an
462 <application>LLVM</application> module.
463 </para>
464 <indexterm zone="llvm llvm-extract">
465 <primary sortas="b-llvm-extract">llvm-extract</primary>
466 </indexterm>
467 </listitem>
468 </varlistentry>
469
470 <varlistentry id="llvm-link">
471 <term><command>llvm-link</command></term>
472 <listitem>
473 <para>
474 is the <application>LLVM</application> linker.
475 </para>
476 <indexterm zone="llvm llvm-link">
477 <primary sortas="b-llvm-link">llvm-link</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="llvm-nm">
483 <term><command>llvm-nm</command></term>
484 <listitem>
485 <para>
486 is used to list <application>LLVM</application> bitcode
487 and object file's symbol table.
488 </para>
489 <indexterm zone="llvm llvm-nm">
490 <primary sortas="b-llvm-nm">llvm-nm</primary>
491 </indexterm>
492 </listitem>
493 </varlistentry>
494<!--
495 <varlistentry id="llvm-prof">
496 <term><command>llvm-prof</command></term>
497 <listitem>
498 <para>
499 is used to print execution profile of
500 <application>LLVM</application> program.
501 </para>
502 <indexterm zone="llvm llvm-prof">
503 <primary sortas="b-llvm-prof">llvm-prof</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>-->
507
508 <varlistentry id="llvm-ranlib">
509 <term><command>llvm-ranlib</command></term>
510 <listitem>
511 <para>
512 is used to generate index for <application>LLVM</application>
513 archive.
514 </para>
515 <indexterm zone="llvm llvm-ranlib">
516 <primary sortas="b-llvm-ranlib">llvm-ranlib</primary>
517 </indexterm>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry id="llvm-stress">
522 <term><command>llvm-stress</command></term>
523 <listitem>
524 <para>
525 is used to generate random
526 <filename class="extension">.ll</filename> files.
527 </para>
528 <indexterm zone="llvm llvm-stress">
529 <primary sortas="b-llvm-stress">llvm-stress</primary>
530 </indexterm>
531 </listitem>
532 </varlistentry>
533
534 <varlistentry id="llvm-tblgen">
535 <term><command>llvm-tblgen</command></term>
536 <listitem>
537 <para>
538 is the <application>LLVM</application> Target Description
539 To C++ Code Generator.
540 </para>
541 <indexterm zone="llvm llvm-tblgen">
542 <primary sortas="b-llvm-tblgen">llvm-tblgen</primary>
543 </indexterm>
544 </listitem>
545 </varlistentry>
546
547 <varlistentry id="opt">
548 <term><command>opt</command></term>
549 <listitem>
550 <para>
551 is the <application>LLVM</application> optimizer.
552 </para>
553 <indexterm zone="llvm opt">
554 <primary sortas="b-opt">opt</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="scan-build">
560 <term><command>scan-build</command></term>
561 <listitem>
562 <para>
563 is a <application>Perl</application> script that invokes the
564 <application>Clang</application> static analyzer.
565 </para>
566 <indexterm zone="llvm scan-build">
567 <primary sortas="b-scan-build">scan-build</primary>
568 </indexterm>
569 </listitem>
570 </varlistentry>
571
572 <varlistentry id="libllvm">
573 <term><filename class="libraryfile">libLLVM-&llvm-version;.so</filename></term>
574 <listitem>
575 <para>
576 contains the <application>LLVM</application> API functions.
577 </para>
578 <indexterm zone="llvm libllvm">
579 <primary sortas="c-libllvm">libLLVM-&llvm-version;.so</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583<!--
584 <varlistentry id="libprofile_rt">
585 <term><filename class="libraryfile">libprofile_rt.so</filename></term>
586 <listitem>
587 <para>
588 is the C, C++ and Objective-C runtime library for
589 <application>Clang</application>.
590 </para>
591 <indexterm zone="llvm libprofile_rt">
592 <primary sortas="c-libprofile_rt">libprofile_rt.so</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>-->
596
597 </variablelist>
598
599 </sect2>
600
601</sect1>
Note: See TracBrowser for help on using the repository browser.