source: general/prog/llvm.xml@ 07ad28a

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 07ad28a was 07ad28a, checked in by Fernando de Oliveira <fernando@…>, 9 years ago

gcc5 tags.

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

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