Overview
========
+This document details how to use the LLVM autotools based build system to
+configure and build LLVM from source. The normal developer process using CMake
+is detailed `here <GettingStarted.html#check-here>`_.
+
+A Quick Summary
+---------------
+
+#. Configure and build LLVM and Clang:
+
+ * ``cd where-you-want-to-build-llvm``
+ * ``mkdir build`` (for building without polluting the source dir)
+ * ``cd build``
+ * ``../llvm/configure [options]``
+ Some common options:
+
+ * ``--prefix=directory`` --- Specify for *directory* the full pathname of
+ where you want the LLVM tools and libraries to be installed (default
+ ``/usr/local``).
+
+ * ``--enable-optimized`` --- Compile with optimizations enabled (default
+ is NO).
+
+ * ``--enable-assertions`` --- Compile with assertion checks enabled
+ (default is YES).
+
+ * ``make [-j]`` --- The ``-j`` specifies the number of jobs (commands) to run
+ simultaneously. This builds both LLVM and Clang for Debug+Asserts mode.
+ The ``--enable-optimized`` configure option is used to specify a Release
+ build.
+
+ * ``make check-all`` --- This run the regression tests to ensure everything
+ is in working order.
+
+ * If you get an "internal compiler error (ICE)" or test failures, see
+ `here <GettingStarted.html#check-here>`_.
Local LLVM Configuration
------------------------
.. code-block:: console
- % SRC_ROOT/configure --prefix=/install/path [other options]
+ % $LLVM_SRC_DIR/configure --prefix=/install/path [other options]
Compiling the LLVM Suite Source Code
------------------------------------
``gmake install``
Installs LLVM header files, libraries, tools, and documentation in a hierarchy
- under ``$PREFIX``, specified with ``./configure --prefix=[dir]``, which
+ under ``$PREFIX``, specified with ``$LLVM_SRC_DIR/configure --prefix=[dir]``, which
defaults to ``/usr/local``.
``gmake -C runtime install-bytecode``
system (which uses the easy-to-read and easy-to-write
`reStructuredText <http://sphinx-doc.org/rest.html>`_ plaintext markup
language).
-The generated documentation is built in the ``SRC_ROOT/docs`` directory using
+The generated documentation is built in the ``$LLVM_SRC_DIR/docs`` directory using
a special makefile.
For instructions on how to install Sphinx, see
`Sphinx Introduction for LLVM Developers
.. code-block:: console
- $ cd SRC_ROOT/docs
+ $ cd $LLVM_SRC_DIR/docs
$ make -f Makefile.sphinx
This creates a ``_build/html`` sub-directory with all of the HTML files, not
.. code-block:: console
- % SRC_ROOT/configure
+ % $LLVM_SRC_DIR/configure
The LLVM build will place files underneath *OBJ_ROOT* in directories named after
the build type: