source: general/prog/llvm.xml@ a4354244

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 a4354244 was bd4f0143, checked in by Pierre Labastie <pieere@…>, 9 years ago

Various fixes:

  • change /usr/man to /usr/sahre/man in doxygen
  • fix llvm build on 32 bit
  • fix manual location in sane-frontends

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

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