mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-22 21:29:23 +01:00
105 lines
2.9 KiB
XML
105 lines
2.9 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../general.ent">
|
|
%general-entities;
|
|
]>
|
|
|
|
<sect1 id="ch-tools-llvm-pass1" role="wrap">
|
|
<?dbhtml filename="llvm-pass1.html"?>
|
|
|
|
<sect1info condition="script">
|
|
<productname>LLVM</productname>
|
|
<productnumber>&llvm-version;</productnumber>
|
|
<address>&llvm-url;</address>
|
|
</sect1info>
|
|
|
|
<title>LLVM-&llvm-version; - Pass 1</title>
|
|
|
|
<indexterm zone="ch-tools-llvm-pass1">
|
|
<primary sortas="a-LLVM">LLVM</primary>
|
|
<secondary>tools, pass 1</secondary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title/>
|
|
|
|
<para>The LLVM package contains a collection of modular and reusable
|
|
compiler and toolchain technologies.</para>
|
|
|
|
<segmentedlist>
|
|
<segtitle>&buildtime;</segtitle>
|
|
<segtitle>&diskspace;</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>&llvm-tmpp1-sbu;</seg>
|
|
<seg>&llvm-tmpp1-du;</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of LLVM</title>
|
|
|
|
<para>Prepare some CMake modules needed by LLVM building system:</para>
|
|
|
|
<screen><userinput remap="pre">tar -xf ../llvm-cmake-&llvm-version;.src.tar.xz
|
|
mv cmake-&llvm-version;.src ../cmake</userinput></screen>
|
|
|
|
<para>The LLVM documentation recommends building LLVM in a dedicated
|
|
build directory:</para>
|
|
|
|
<screen><userinput remap="pre">mkdir -v build
|
|
cd build</userinput></screen>
|
|
|
|
<para>Prepare LLVM for compilation:</para>
|
|
|
|
<screen><userinput remap="configure">CC=gcc CXX=g++ cmake \
|
|
-DCMAKE_INSTALL_PREFIX=$LFS/tools \
|
|
-DLLVM_ENABLE_FFI=OFF \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DLLVM_BUILD_LLVM_DYLIB=ON \
|
|
-DLLVM_LINK_LLVM_DYLIB=ON \
|
|
-DLLVM_ENABLE_RTTI=ON \
|
|
-DLLVM_TARGETS_TO_BUILD=host \
|
|
-DLLVM_INCLUDE_BENCHMARKS=OFF \
|
|
-Wno-dev ..</userinput></screen>
|
|
|
|
<variablelist>
|
|
<title>The meaning of the configure options:</title>
|
|
|
|
<varlistentry>
|
|
<term><parameter>-DLLVM_ENABLE_FFI=OFF</parameter></term>
|
|
<listitem>
|
|
<para>Allow building LLVM without libffi installed on the host
|
|
distro.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
<para>For the meaning of other CMake options, see TODO.</para>
|
|
|
|
<para>Compile LLVM by running:</para>
|
|
|
|
<screen><userinput remap="make">make</userinput></screen>
|
|
|
|
<para>Install the package:</para>
|
|
|
|
<screen><userinput remap="install">make install</userinput></screen>
|
|
|
|
<para>Clean up the source directory:</para>
|
|
|
|
<screen><userinput remap="install">rm -rf ../../cmake</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title/>
|
|
|
|
<para>Details on this package are located in
|
|
<xref linkend="contents-llvm" role="."/></para>
|
|
</sect2>
|
|
|
|
</sect1>
|