source: general/prog/llvm.xml@ 08fcbaa1

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 08fcbaa1 was b3b7e36, checked in by Fernando de Oliveira <fernando@…>, 9 years ago
  • Update to llvm-3.7.0.
  • Update to mesa-10.6.6.

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

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