blob: ee74331b4149cfb5fd8933fcef8446ef96cd91de [file] [log] [blame]
<html>
<head>
<title>LLBrowse - a graphical browser for LLVM modules.</title>
<link rel="stylesheet" href="http://llvm.org/docs/llvm.css" type="text/css">
</head>
<body>
<div class="doc_title">
LLBrowse - A graphical browser for LLVM modules.
</div>
<ul>
<li><a href="#requirements">Requirements</a>
<li><a href="#checkout">Getting the code</a>
<li><a href="#building">Building</a>
<li><a href="#running">Running</a>
</ul>
<div class="doc_section">
<a name="requirements"><b>Requirements</b></a>
</div>
<div class="doc_text">
<p>LLBrowse requires the following packages to be installed:
<ul>
<li><b>LLVM 2.8</b> or higher.
<li><b>wxWidgets</b> (See <a href="http://www.wxwidgets.org">www.wxwidgets.org</a>. Any recent version should work.)
<li><b>CMake 2.8</b> or higher.(See <a href="http://www.cmake.org">http://www.cmake.org/</a>.)
</ul>
</div>
<div class="doc_section">
<a name="checkout"><b>Getting the code</b></a>
</div>
<div class="doc_text">
<p>You can get the source code to LLBRowse via Subversion:</p>
<ul>
<li><tt>cd <i>where-you-want-llbrowse-to-live</i></tt>
<li>Read-Only: <tt>svn co http://llvm.org/svn/llvm-project/llbrowse/trunk llbrowse</tt>
<li>Read-Write: <tt>svn co https://user@llvm.org/svn/llvm-project/llbrowse/trunk llbrowse</tt>
</ul>
</div>
<div class="doc_section">
<a name="building"><b>Building</b></a>
</div>
<div class="doc_text">
<p>LLBrowse uses CMake to generate the Makefiles for the project.
<ol>
<li><p>Create a directory for containing the build. It is not
supported to build LLBrowse on the source directory. cd to this
directory:</p>
<div class="doc_code">
<p><tt>mkdir <i>mybuilddir</i></tt></p>
<p><tt>cd <i>mybuilddir</i></tt></p>
</div>
<li><p>Execute this command on the shell
replacing <i>path/to/llbrowse/source/root</i> with the path to the
root of your LLBrowse source tree:</p>
<div class="doc_code">
<p><tt>cmake <i>path/to/llbrowse/source/root</i></tt></p>
</div>
<p>If your installation of 'llvm-config' is not in one of the standard
places, you can tell CMake where to find it by defining <tt>LLVM_CONFIG_EXECUTABLE</tt> on the command line.
<div class="doc_code">
<p><tt>cmake <i>path/to/llbrowse/source/root</i> -D LLVM_CONFIG_EXECUTABLE="<i>path/to/llvm-config</i>"</tt></p>
</div>
<p><b>Note for Mac OS X</b>: If you are trying to build under OS X 10.6 ("Snow Leopard") you will
need to tell CMake to build the project as a 32-bit executable, rather than 64-bits which is the default.
The reason for this is because wxWidgets uses the Carbon APIs, and there's no 64-bit version of Carbon.
You will also need a 32-bit version of the LLVM libraries.
<div class="doc_code">
<p><tt>cmake <i>path/to/llbrowse/source/root</i> -D CMAKE_OSX_ARCHITECTURES="i386;ppc"</tt></p>
</div>
<li><p>If CMake was successful, you can now build the executable by running
'make':
<div class="doc_code">
<p><tt>make</tt></p>
</div>
</ol>
Of course, if you prefer to build using Eclipse, KDevelop or another IDE,
you can have CMake generate the appropriate project files for those
environments. Consult the CMake documentation or run <tt>cmake --help</tt> for
instructions how to do this.
</div>
<div class="doc_section">
<a name="running"><b>Running</b></a>
</div>
<div class="doc_text">
<p>You can run the <tt>llbrowse</tt> program from the shell:
<div class="doc_code">
<p><tt>cd <i>mybuilddir</i></tt></p>
<p><tt>./llbrowse</tt></p>
</div>
<p>The program should open a new, blank window:
<p><img src="llbrowse1.png">
<p>To open an LLVM module, select the <b>File -> Open</b> menu. A file dialog should
appear. Select the module file (either a .bc or .ll file) and click "Open"
in the dialog box.
<p>You should now see an outline of the module contents:
<p><img src="llbrowse2.png">
<p>At this point, you can explore the contents of the module by expanding
the nodes of the tree view. The pane on the right side shows additional
details about the currently selected item.
<p><img src="llbrowse3.png">
</div>
</body>
</html>