mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 06:52:14 +08:00
fd7a66d604
Mesa's new deps are now in BLFS, track their versions instead. Libclc was outdated, fixed a type in its xml file. Moved spirv-llvm-* from shareddeps/gfxapi/vk -> shareddeps/drivers.
201 lines
6.2 KiB
XML
201 lines
6.2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!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;
|
|
|
|
<!ENTITY spirv-llvm-translator-download-http "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/v&spirv-llvm-translator-version;/v&spirv-llvm-translator-version;.tar.gz">
|
|
<!ENTITY spirv-llvm-translator-download-ftp " ">
|
|
]>
|
|
|
|
<sect1 id="spirv-llvm-translator" xreflabel="SPIRV-LLVM-Translator-&spirv-llvm-translator-version;">
|
|
<?dbhtml filename="spirv-llvm-translator.html"?>
|
|
|
|
<title>SPIRV-LLVM-Translator-&spirv-llvm-translator-version;</title>
|
|
|
|
<indexterm zone="spirv-llvm-translator">
|
|
<primary sortas="a-spirv-llvm-translator">SPIRV-LLVM-Translator</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to SPIRV-LLVM-Translator</title>
|
|
|
|
<para>
|
|
<application>SPIRV-LLVM-Translator</application> is a tool and a library
|
|
for bi-directional translation between SPIR-V and LLVM IR.
|
|
</para>
|
|
|
|
&lfs121_checked;
|
|
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&spirv-llvm-translator-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&spirv-llvm-translator-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">SPIRV-LLVM-Translator Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="cmake"/>,
|
|
<xref linkend="llvm"/> (with Clang),
|
|
<xref linkend="spirv-headers"/>, and
|
|
<xref linkend="spirv-tools"/>
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of SPIRV-LLVM-Translator</title>
|
|
|
|
<note>
|
|
<para>
|
|
This tarball is <filename>v&spirv-llvm-translator-version;.tar.gz</filename>.
|
|
<filename>v&spirv-llvm-translator-version;.tar.gz</filename> will
|
|
extract to the directory <filename class="directory">
|
|
SPIRV-LLVM-Translator-&spirv-llvm-translator-version;</filename>.
|
|
</para>
|
|
</note>
|
|
|
|
<para>
|
|
Install <application>SPIRV-LLVM-Translator</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>mkdir build &&
|
|
cd build &&
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \
|
|
-G Ninja .. &&
|
|
ninja</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue: <command>ninja test</command>.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the &root; user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>ninja install</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>32-bit Installation of SPIRV-LLVM-Translator</title>
|
|
|
|
<para>
|
|
First clean the build directory:
|
|
</para>
|
|
|
|
<screen><userinput>rm -rf *</userinput></screen>
|
|
|
|
<para>
|
|
Install lib32-<application>SPIRV-LLVM-Translator</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen><userinput>CC="gcc -m32" CXX="g++ -m32" \
|
|
PKG_CONFIG_PATH=/usr/lib32/pkgconfig \
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib32 \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DBUILD_SHARED_LIBS=ON \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr \
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=/usr/include/spirv \
|
|
-G Ninja .. &&
|
|
ninja</userinput></screen>
|
|
|
|
<para>
|
|
Now, as the &root; user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>DESTDIR=$PWD/DESTDIR ninja install
|
|
cp -vr DESTDIR/usr/lib32/* /usr/lib32
|
|
rm -rf DESTDIR
|
|
ldconfig</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<parameter>-DBUILD_SHARED_LIBS=ON</parameter>: This switch forces the
|
|
build system to install shared libraries instead of static libraries.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>-DLLVM_EXTERNAL_SPIRV_HEADERS_*</parameter>: These switches tells the
|
|
build system that <xref linkend="spirv-headers" role="nodep"/> is
|
|
installed in /usr and /usr/include/spirv/. This is needed since the build system
|
|
tries to download and use the downloaded headers not on the system.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
llvm-spirv
|
|
</seg>
|
|
<seg>
|
|
libLLVMSPIRVLib.so
|
|
</seg>
|
|
<seg>
|
|
/usr/include/libLLVMSPIRVLib
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="llvm-spirv">
|
|
<term><command>llvm-spirv</command></term>
|
|
<listitem>
|
|
<para>
|
|
translates LLVM bitcode and SPIR-V binaries
|
|
</para>
|
|
<indexterm zone="spirv-llvm-translator llvm-spirv">
|
|
<primary sortas="b-llvm-spirv">llvm-spirv</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libLLVMSPIRVLib">
|
|
<term><filename class="libraryfile">libLLVMSPIRVLib.so</filename></term>
|
|
<listitem>
|
|
<para>
|
|
contains functions for translating between SPIR-V and LLVM IR
|
|
</para>
|
|
<indexterm zone="spirv-llvm-translator libLLVMSPIRVLib">
|
|
<primary sortas="c-libLLVMSPIRVLib">libLLVMSPIRVLib.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
</sect1>
|