From 1cdc9fbb9589c54ed0d154e50d9fe5f579420a78 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Sun, 26 Feb 2012 22:12:59 +0000 Subject: [PATCH] Cleanup the LLVM Getting Started page. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151505 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/GettingStarted.html | 118 +++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 54 deletions(-) diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 9db9bb26034..c4fd3a1459a 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -108,11 +108,9 @@ and performance.
-

The LLVM Getting Started documentation is wildly out of date and is -in dire need of an update. Most notably, Clang has replaced the GCC front end -entirely and building with the LLVM GCC front end is no longer supported. -The Clang Getting Started -page might be a better place to start.

+

The LLVM Getting Started documentation may be out of date. So, the Clang +Getting Started page might +also be a good place to start.

Here's the short story for getting up and running quickly with LLVM:

@@ -120,69 +118,81 @@ page might be a better place to start.

  • Read the documentation.
  • Read the documentation.
  • Remember that you were warned twice about reading the documentation.
  • -
  • Install the llvm-gcc-4.2 front end if you intend to compile C or C++ - (see Install the GCC Front End for details): -
      -
    1. cd where-you-want-the-C-front-end-to-live
    2. -
    3. gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf -
    4. -
    5. install-binutils-binary-from-MinGW (Windows only)
    6. -
    7. Note: If the binary extension is ".bz" use bunzip2 instead of gunzip.
    8. -
    9. Note: On Windows, use 7-Zip or a similar archiving tool.
    10. -
    11. Add llvm-gcc's "bin" directory to your PATH environment variable.
    12. -
  • -
  • Get the LLVM Source Code +
  • Checkout LLVM:
      -
    • With the distributed files (or use SVN): -
        -
      1. cd where-you-want-llvm-to-live -
      2. gunzip --stdout llvm-version.tar.gz | tar -xvf - -
    • - -
  • +
  • cd where-you-want-llvm-to-live +
  • svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
  • + + -
  • [Optional] Get the Test Suite Source Code +
  • Checkout Clang:
      -
    • With the distributed files (or use SVN): -
        -
      1. cd where-you-want-llvm-to-live -
      2. cd llvm/projects -
      3. gunzip --stdout llvm-test-version.tar.gz | tar -xvf - -
      4. mv llvm-test-version test-suite -
    • +
    • cd where-you-want-llvm-to-live +
    • cd llvm/tools +
    • svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
    • +
    +
  • - +
  • Checkout Compiler-RT: +
      +
    • cd where-you-want-llvm-to-live +
    • cd llvm/projects +
    • svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk + compiler-rt
    • +
    +
  • +
  • Get the Test Suite Source Code [Optional] +
      +
    • cd where-you-want-llvm-to-live +
    • cd llvm/projects +
    • svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
    • +
    +
  • -
  • Configure the LLVM Build Environment -
      +
    1. Configure and build LLVM and Clang: +
      • cd where-you-want-to-build-llvm
      • -
      • /path/to/llvm/configure [options]
        +
      • 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 +

        • --prefix=directory - + Specify for directory the full pathname of where you want the LLVM tools and libraries to be installed (default - /usr/local).

        • -
        • --with-llvmgccdir=directory -

          Optionally, specify for directory the full pathname of the - C/C++ front end installation to use with this LLVM configuration. If - not specified, the PATH will be searched. This is only needed if you - want to run test-suite or do some special kinds of LLVM builds.

        • -
        • --enable-spec2000=directory -

          Enable the SPEC2000 benchmarks for testing. The SPEC2000 - benchmarks should be available in - directory.

        • + /usr/local).
        -
  • -
  • Build the LLVM Suite: -
      -
    1. gmake -k |& tee gnumake.out -    # this is csh or tcsh syntax
    2. -
    3. If you get an "internal compiler error (ICE)" or test failures, see - below.
    4. +
        +
      • --enable-optimized - + Compile with optimizations enabled (default is NO).
      • +
      + +
        +
      • --enable-assertions - + Compile with assertion checks enabled (default is YES).
      • +
      + +
    5. make [-j] - The -j specifies the number of jobs (commands) to + run simultaneously. This builds both LLVM and Clang for Debug+Asserts mode. + The --enabled-optimized configure option is used to specify a Release build.
    6. +
    7. make check-all - + This run the regression tests to ensure everything is in working order.
    8. +
    9. make update - + This command is used to update all the svn repositories at once, rather then + having to cd into the individual repositories and running + svn update.
    10. +
    11. It is also possible to use CMake instead of the makefiles. With CMake + it is also possible to generate project files for several IDEs: Eclipse + CDT4, CodeBlocks, Qt-Creator (use the CodeBlocks generator), KDevelop3.
    12. +
    13. If you get an "internal compiler error (ICE)" or test failures, see + below.
    14. + + +
    -- 2.34.1