[libFuzzer] remove the section about '-tokens' as I am going to deprecate this option
[oota-llvm.git] / docs / BuildingLLVMWithAutotools.rst
index 9751950398734febda1a2c2ea761ba23c409a643..6f9a13410555c81db372d8ee7066e0d8befa0380 100644 (file)
@@ -8,6 +8,41 @@ Building LLVM With Autotools
 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
 ------------------------
@@ -86,7 +121,7 @@ To configure LLVM, follow these steps:
 
    .. 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
 ------------------------------------
@@ -152,7 +187,7 @@ 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``
@@ -205,7 +240,7 @@ There are some HTML documents that have not yet been converted to the new
 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
@@ -215,7 +250,7 @@ HTML documentation by doing the following:
 
 .. 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
@@ -261,7 +296,7 @@ This is accomplished in the typical autoconf manner:
 
   .. 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: