source: general/prog/llvm.xml@ f1607a4

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since f1607a4 was f1607a4, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Add valgrind to the book

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

  • Property mode set to 100644
File size: 19.3 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.gz">
8 <!ENTITY llvm-download-ftp " ">
9 <!ENTITY llvm-md5sum "46ed668a1ce38985120dbf6344cf6116">
10 <!ENTITY llvm-size "16 MB">
11 <!ENTITY llvm-buildsize "519 MB (1.1 GB with Clang)">
12 <!ENTITY llvm-time "11.4 SBU and 0.4 for tests (22.7 SBU with Clang)">
13
14 <!ENTITY clang-download-http "http://llvm.org/releases/&llvm-version;/clang-&llvm-version;.src.tar.gz">
15 <!ENTITY clang-md5sum "b378f1e2c424e03289effc75268d3d2c">
16 <!ENTITY clang-size "11 MB">
17
18 <!ENTITY compiler-rt-download-http "http://llvm.org/releases/&llvm-version;/compiler-rt-&llvm-version;.src.tar.gz">
19 <!ENTITY compiler-rt-md5sum "7938353e3a3bda85733a165e7ac4bb84">
20 <!ENTITY compiler-rt-size "1.8 MB">
21]>
22
23<sect1 id="llvm" xreflabel="LLVM-&llvm-version;">
24 <?dbhtml filename="llvm.html" ?>
25
26 <sect1info>
27 <othername>$LastChangedBy$</othername>
28 <date>$Date$</date>
29 </sect1info>
30
31 <title>LLVM-&llvm-version;</title>
32
33 <indexterm zone="llvm">
34 <primary sortas="a-LLVM">LLVM</primary>
35 </indexterm>
36
37 <sect2 role="package">
38 <title>Introduction to LLVM</title>
39
40 <para>
41 The <application>LLVM</application> package contains a collection of modular and
42 reusable compiler and toolchain technologies. The Low Level Virtual Machine
43 (LLVM) Core libraries provide a modern source and target-independent optimizer,
44 along with code generation support for many popular CPUs (as well as some less
45 common ones!). These libraries are built around a well specified code
46 representation known as the LLVM intermediate representation ("LLVM IR").
47 </para>
48
49 <para>
50 The optional <application>Clang</application> and <application>Compiler RT</application>
51 packages provide a new C, C++, Objective C and Objective C++ front-ends and runtime
52 libraries for the <application>LLVM</application>.
53 </para>
54
55 &lfs75_checked;
56
57 <bridgehead renderas="sect3">Package Information</bridgehead>
58 <itemizedlist spacing="compact">
59 <listitem>
60 <para>
61 Download (HTTP): <ulink url="&llvm-download-http;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download (FTP): <ulink url="&llvm-download-ftp;"/>
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download MD5 sum: &llvm-md5sum;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Download size: &llvm-size;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated disk space required: &llvm-buildsize;
82 </para>
83 </listitem>
84 <listitem>
85 <para>
86 Estimated build time: &llvm-time;
87 </para>
88 </listitem>
89 </itemizedlist>
90
91 <bridgehead renderas="sect3">Optional Downloads</bridgehead>
92
93 <bridgehead renderas="sect4">Clang</bridgehead>
94 <itemizedlist spacing="compact">
95 <listitem>
96 <para>
97 Download: <ulink url="&clang-download-http;"/>
98 </para>
99 </listitem>
100 <listitem>
101 <para>
102 Download MD5 sum: &clang-md5sum;
103 </para>
104 </listitem>
105 <listitem>
106 <para>
107 Download size: &clang-size;
108 </para>
109 </listitem>
110 </itemizedlist>
111
112 <bridgehead renderas="sect4">Compiler RT</bridgehead>
113 <itemizedlist spacing="compact">
114 <listitem>
115 <para>
116 Download: <ulink url="&compiler-rt-download-http;"/>
117 </para>
118 </listitem>
119 <listitem>
120 <para>
121 Download MD5 sum: &compiler-rt-md5sum;
122 </para>
123 </listitem>
124 <listitem>
125 <para>
126 Download size: &compiler-rt-size;
127 </para>
128 </listitem>
129 </itemizedlist>
130
131 <bridgehead renderas="sect3">LLVM Dependencies</bridgehead>
132
133 <bridgehead renderas="sect4">Recommended</bridgehead>
134 <para role="recommended">
135 <xref linkend="libffi"/> and
136 <xref linkend="python2"/>
137 </para>
138
139 <bridgehead renderas="sect4">Optional</bridgehead>
140 <para role="optional">
141 <xref linkend="doxygen"/>,
142 <xref linkend="graphviz"/>,
143 <xref linkend="libxml2"/>,
144 <xref linkend="texlive"/>,
145 <xref linkend="zip"/>,
146 <ulink url="http://www.ocaml.org/">OCaml</ulink>,
147 <ulink url="http://pypi.python.org/pypi/Sphinx">Sphinx</ulink> and
148 <xref linkend="valgrind"/>
149 </para>
150
151 <para condition="html" role="usernotes">User Notes:
152 <ulink url="&blfs-wiki;/llvm"/>
153 </para>
154 </sect2>
155
156 <sect2 role="installation">
157 <title>Installation of LLVM</title>
158
159 <para>
160 If you have downloaded the optional packages, install them into
161 the source tree by running the following commands:
162 </para>
163
164<screen><userinput>tar -xf ../clang-&llvm-version;.src.tar.gz -C tools &amp;&amp;
165tar -xf ../compiler-rt-&llvm-version;.src.tar.gz -C projects &amp;&amp;
166
167mv tools/clang-&llvm-version; tools/clang &amp;&amp;
168mv projects/compiler-rt-&llvm-version; projects/compiler-rt</userinput></screen>
169
170 <para>
171 Install <application>LLVM</application> by running the following
172 commands:
173 </para>
174
175<screen><userinput>sed -e 's:\$(PROJ_prefix)/docs/llvm:$(PROJ_prefix)/share/doc/llvm-&llvm-version;:' \
176 -i Makefile.config.in &amp;&amp;
177CC=gcc CXX=g++ \
178./configure --prefix=/usr \
179 --sysconfdir=/etc \
180 --enable-libffi \
181 --enable-optimized \
182 --enable-shared \
183 --disable-assertions &amp;&amp;
184make</userinput></screen>
185<!-- -disable-expensive-checks &amp;&amp; default -->
186<!-- -disable-debug-runtime \ default -->
187<!-- -enable-targets=all \ default -->
188<!-- -enable-experimental-targets=R600 &amp;&amp;
189it is default, now, not anymore experimental-->
190
191 <para>
192 If you have installed <application>Sphinx</application> and wish
193 to generate manual pages, issue the following command:
194 </para>
195
196<screen><userinput>make -C docs -f Makefile.sphinx man</userinput></screen>
197
198 <para>
199 To test the results, issue: <command>make check</command>.
200 </para>
201
202 <para>
203 Now, as the <systemitem class="username">root</systemitem> user:
204 </para>
205
206<screen role="root"><userinput>make install &amp;&amp;
207for file in /usr/lib/lib{clang,LLVM,LTO}*.a
208do
209 test -f $file &amp;&amp; chmod -v 644 $file
210done</userinput></screen>
211
212 <para>
213 If you had <xref linkend="python2"/> installed and you have
214 built <application>Clang</application>, install the
215 <application>Clang Analyzer</application> by running the
216 following command as the
217 <systemitem class="username">root</systemitem> user:
218 </para>
219
220<screen role="root"><userinput>install -v -dm755 /usr/lib/clang-analyzer &amp;&amp;
221for prog in scan-build scan-view
222do
223 cp -rfv tools/clang/tools/$prog /usr/lib/clang-analyzer/
224 ln -sfv ../lib/clang-analyzer/$prog/$prog /usr/bin/
225done &amp;&amp;
226ln -sfv /usr/bin/clang /usr/lib/clang-analyzer/scan-build/ &amp;&amp;
227mv -v /usr/lib/clang-analyzer/scan-build/scan-build.1 /usr/share/man/man1/</userinput></screen>
228
229 <para>
230 If you have built manual pages, install them by running the
231 following command as the
232 <systemitem class="username">root</systemitem> user:
233 </para>
234
235<screen role="root"><userinput>install -v -m644 docs/_build/man/* /usr/share/man/man1/</userinput></screen>
236
237 </sect2>
238
239 <sect2 role="commands">
240 <title>Command Explanations</title>
241
242 <para>
243 <command>sed -e ...</command>: This sed fixes location of the
244 installed documentation.
245 </para>
246
247 <para>
248 <parameter>--enable-libffi</parameter>: This switch enables
249 <application>LLVM</application> to use
250 <application>libffi</application>. Remove if you did not
251 install <application>libffi</application>.
252 </para>
253
254 <para>
255 <parameter>--enable-optimized</parameter>: This switch enables
256 compiler optimizations in order to speed up the code and reduce
257 its size.
258 </para>
259
260 <para>
261 <parameter>--enable-shared</parameter>: This switch enables
262 building of the <application>LLVM</application> shared
263 library which contains all of static libraries linked into
264 single library.
265 </para>
266<!--
267 <para>
268 <parameter>-enable-targets=all</parameter>: This switch ensures
269 that all <application>LLVM</application> targets are built.
270 </para>-->
271
272 <para>
273 <parameter>--disable-assertions</parameter>: Disable some compile checks,
274 not necessary on a production system.
275 </para>
276<!--
277 <para>
278 <parameter>-enable-experimental-targets=R600</parameter>:
279 This switch enables R600 target which is required by
280 <application>Mesa</application> to build the radeonsi
281 3D driver. It can be used for R600
282 <application>LLVM</application> backend and OpenCL
283 state tracker in <application>Mesa</application>.
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), clang-check, clang-format, clang-tblgen,
299 llc, lli, lli-child-target, llvm-ar, llvm-as, llvm-bcanalyzer, llvm-config, llvm-cov, llvm-diff,
300 llvm-dis, llvm-dwarfdump, llvm-extract, llvm-link, llvm-mc, llvm-mcmarkup,
301 llvm-nm, llvm-objdump,<!-- llvm-prof,--> llvm-ranlib (symlink), llvm-readobj, llvm-rtdyld,
302 llvm-size, llvm-stress, llvm-symbolizer, llvm-tblgen, macho-dump, opt,
303 scan-build (symlink) and scan-view (symlink)
304 </seg>
305 <seg>
306 BugpointPasses.so, libclang.so, libLLVM-&llvm-version;.so,
307 libLTO.so,<!-- libprofile_rt.so,--> LLVMHello.so and numerous
308 static libraries in /usr/lib
309 </seg>
310 <seg>
311 /usr/include/clang,
312 /usr/include/clang-c,
313 /usr/include/llvm,
314 /usr/include/llvm-c,
315 /usr/lib/clang,
316 /usr/lib/clang-analyzer,
317 /usr/share/doc/html/clang, and
318 /usr/share/doc/llvm-&llvm-version;
319 </seg>
320 </seglistitem>
321 </segmentedlist>
322
323 <variablelist>
324 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
325 <?dbfo list-presentation="list"?>
326 <?dbhtml list-presentation="table"?>
327
328 <varlistentry id="bugpoint">
329 <term><command>bugpoint</command></term>
330 <listitem>
331 <para>
332 is the automatic test case reduction tool.
333 </para>
334 <indexterm zone="llvm bugpoint">
335 <primary sortas="b-bugpoint">bugpoint</primary>
336 </indexterm>
337 </listitem>
338 </varlistentry>
339
340 <varlistentry id="clang">
341 <term><command>clang</command></term>
342 <listitem>
343 <para>
344 is the <application>Clang</application> C, C++,
345 and Objective-C compiler.
346 </para>
347 <indexterm zone="llvm clang">
348 <primary sortas="b-clang">clang</primary>
349 </indexterm>
350 </listitem>
351 </varlistentry>
352
353 <varlistentry id="llc">
354 <term><command>llc</command></term>
355 <listitem>
356 <para>
357 is the <application>LLVM</application> static compiler.
358 </para>
359 <indexterm zone="llvm llc">
360 <primary sortas="b-llc">llc</primary>
361 </indexterm>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry id="lli">
366 <term><command>lli</command></term>
367 <listitem>
368 <para>
369 is used to directly execute programs from
370 <application>LLVM</application> bitcode.
371 </para>
372 <indexterm zone="llvm lli">
373 <primary sortas="b-lli">lli</primary>
374 </indexterm>
375 </listitem>
376 </varlistentry>
377
378 <varlistentry id="llvm-ar">
379 <term><command>llvm-ar</command></term>
380 <listitem>
381 <para>
382 is the <application>LLVM</application> archiver.
383 </para>
384 <indexterm zone="llvm llvm-ar">
385 <primary sortas="b-llvm-ar">llvm-ar</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="llvm-as">
391 <term><command>llvm-as</command></term>
392 <listitem>
393 <para>
394 is the <application>LLVM</application> assembler.
395 </para>
396 <indexterm zone="llvm llvm-as">
397 <primary sortas="b-llvm-as">llvm-as</primary>
398 </indexterm>
399 </listitem>
400 </varlistentry>
401
402 <varlistentry id="llvm-bcanalyzer">
403 <term><command>llvm-bcanalyzer</command></term>
404 <listitem>
405 <para>
406 is the <application>LLVM</application> bitcode analyzer.
407 </para>
408 <indexterm zone="llvm llvm-bcanalyzer">
409 <primary sortas="b-llvm-bcanalyzer">llvm-bcanalyzer</primary>
410 </indexterm>
411 </listitem>
412 </varlistentry>
413
414 <varlistentry id="llvm-config">
415 <term><command>llvm-config</command></term>
416 <listitem>
417 <para>
418 Prints <application>LLVM</application> compilation options.
419 </para>
420 <indexterm zone="llvm llvm-config">
421 <primary sortas="b-llvm-config">llvm-config</primary>
422 </indexterm>
423 </listitem>
424 </varlistentry>
425
426 <varlistentry id="llvm-cov">
427 <term><command>llvm-cov</command></term>
428 <listitem>
429 <para>
430 is used to emit coverage information.
431 </para>
432 <indexterm zone="llvm llvm-cov">
433 <primary sortas="b-llvm-cov">llvm-cov</primary>
434 </indexterm>
435 </listitem>
436 </varlistentry>
437
438 <varlistentry id="llvm-diff">
439 <term><command>llvm-diff</command></term>
440 <listitem>
441 <para>
442 is the <application>LLVM</application> structural
443 '<command>diff</command>'.
444 </para>
445 <indexterm zone="llvm llvm-diff">
446 <primary sortas="b-llvm-diff">llvm-diff</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="llvm-dis">
452 <term><command>llvm-dis</command></term>
453 <listitem>
454 <para>
455 is the <application>LLVM</application> disassembler.
456 </para>
457 <indexterm zone="llvm llvm-dis">
458 <primary sortas="b-llvm-dis">llvm-dis</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="llvm-extract">
464 <term><command>llvm-extract</command></term>
465 <listitem>
466 <para>
467 is used to extract a function from an
468 <application>LLVM</application> module.
469 </para>
470 <indexterm zone="llvm llvm-extract">
471 <primary sortas="b-llvm-extract">llvm-extract</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="llvm-link">
477 <term><command>llvm-link</command></term>
478 <listitem>
479 <para>
480 is the <application>LLVM</application> linker.
481 </para>
482 <indexterm zone="llvm llvm-link">
483 <primary sortas="b-llvm-link">llvm-link</primary>
484 </indexterm>
485 </listitem>
486 </varlistentry>
487
488 <varlistentry id="llvm-nm">
489 <term><command>llvm-nm</command></term>
490 <listitem>
491 <para>
492 is used to list <application>LLVM</application> bitcode
493 and object file's symbol table.
494 </para>
495 <indexterm zone="llvm llvm-nm">
496 <primary sortas="b-llvm-nm">llvm-nm</primary>
497 </indexterm>
498 </listitem>
499 </varlistentry>
500<!--
501 <varlistentry id="llvm-prof">
502 <term><command>llvm-prof</command></term>
503 <listitem>
504 <para>
505 is used to print execution profile of
506 <application>LLVM</application> program.
507 </para>
508 <indexterm zone="llvm llvm-prof">
509 <primary sortas="b-llvm-prof">llvm-prof</primary>
510 </indexterm>
511 </listitem>
512 </varlistentry>-->
513
514 <varlistentry id="llvm-ranlib">
515 <term><command>llvm-ranlib</command></term>
516 <listitem>
517 <para>
518 is used to generate index for <application>LLVM</application>
519 archive.
520 </para>
521 <indexterm zone="llvm llvm-ranlib">
522 <primary sortas="b-llvm-ranlib">llvm-ranlib</primary>
523 </indexterm>
524 </listitem>
525 </varlistentry>
526
527 <varlistentry id="llvm-stress">
528 <term><command>llvm-stress</command></term>
529 <listitem>
530 <para>
531 is used to generate random
532 <filename class="extension">.ll</filename> files.
533 </para>
534 <indexterm zone="llvm llvm-stress">
535 <primary sortas="b-llvm-stress">llvm-stress</primary>
536 </indexterm>
537 </listitem>
538 </varlistentry>
539
540 <varlistentry id="llvm-tblgen">
541 <term><command>llvm-tblgen</command></term>
542 <listitem>
543 <para>
544 is the <application>LLVM</application> Target Description
545 To C++ Code Generator.
546 </para>
547 <indexterm zone="llvm llvm-tblgen">
548 <primary sortas="b-llvm-tblgen">llvm-tblgen</primary>
549 </indexterm>
550 </listitem>
551 </varlistentry>
552
553 <varlistentry id="opt">
554 <term><command>opt</command></term>
555 <listitem>
556 <para>
557 is the <application>LLVM</application> optimizer.
558 </para>
559 <indexterm zone="llvm opt">
560 <primary sortas="b-opt">opt</primary>
561 </indexterm>
562 </listitem>
563 </varlistentry>
564
565 <varlistentry id="scan-build">
566 <term><command>scan-build</command></term>
567 <listitem>
568 <para>
569 is a <application>Perl</application> script that invokes the
570 <application>Clang</application> static analyzer.
571 </para>
572 <indexterm zone="llvm scan-build">
573 <primary sortas="b-scan-build">scan-build</primary>
574 </indexterm>
575 </listitem>
576 </varlistentry>
577
578 <varlistentry id="libllvm">
579 <term><filename class="libraryfile">libLLVM-&llvm-version;.so</filename></term>
580 <listitem>
581 <para>
582 contains the <application>LLVM</application> API functions.
583 </para>
584 <indexterm zone="llvm libllvm">
585 <primary sortas="c-libllvm">libLLVM-&llvm-version;.so</primary>
586 </indexterm>
587 </listitem>
588 </varlistentry>
589<!--
590 <varlistentry id="libprofile_rt">
591 <term><filename class="libraryfile">libprofile_rt.so</filename></term>
592 <listitem>
593 <para>
594 is the C, C++ and Objective-C runtime library for
595 <application>Clang</application>.
596 </para>
597 <indexterm zone="llvm libprofile_rt">
598 <primary sortas="c-libprofile_rt">libprofile_rt.so</primary>
599 </indexterm>
600 </listitem>
601 </varlistentry>-->
602
603 </variablelist>
604
605 </sect2>
606
607</sect1>
Note: See TracBrowser for help on using the repository browser.