Daniel Dunbar | 07cf3f8 | 2009-09-13 02:21:31 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // Clang Installation Instructions |
| 3 | //===----------------------------------------------------------------------===// |
| 4 | |
| 5 | These instructions describe how to build and install Clang. |
| 6 | |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // Step 1: Organization |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | Clang is designed to be built as part of an LLVM build. Assuming that the LLVM |
| 12 | source code is located at $LLVM_SRC_ROOT, then the clang source code should be |
| 13 | installed as: |
| 14 | |
| 15 | $LLVM_SRC_ROOT/tools/clang |
| 16 | |
| 17 | The directory is not required to be called clang, but doing so will allow the |
| 18 | LLVM build system to automatically recognize it and build it along with LLVM. |
| 19 | |
| 20 | //===----------------------------------------------------------------------===// |
| 21 | // Step 2: Configure and Build LLVM |
| 22 | //===----------------------------------------------------------------------===// |
| 23 | |
| 24 | Configure and build your copy of LLVM (see $LLVM_SRC_ROOT/GettingStarted.html |
| 25 | for more information). |
| 26 | |
| 27 | Assuming you installed clang at $LLVM_SRC_ROOT/tools/clang then Clang will |
| 28 | automatically be built with LLVM. Otherwise, run 'make' in the Clang source |
| 29 | directory to build Clang. |
| 30 | |
| 31 | //===----------------------------------------------------------------------===// |
| 32 | // Step 3: (Optional) Verify Your Build |
| 33 | //===----------------------------------------------------------------------===// |
| 34 | |
| 35 | It is a good idea to run the Clang tests to make sure your build works |
| 36 | correctly. From inside the Clang build directory, run 'make test' to run the |
| 37 | tests. |
| 38 | |
| 39 | //===----------------------------------------------------------------------===// |
| 40 | // Step 4: Install Clang |
| 41 | //===----------------------------------------------------------------------===// |
| 42 | |
| 43 | From inside the Clang build directory, run 'make install' to install the Clang |
| 44 | compiler and header files into the prefix directory selected when LLVM was |
| 45 | configured. |
| 46 | |
Douglas Gregor | ed03c9f | 2013-02-05 22:01:16 +0000 | [diff] [blame] | 47 | The Clang compiler is available as 'clang' and 'clang++'. It supports a gcc like command line |
Daniel Dunbar | 07cf3f8 | 2009-09-13 02:21:31 +0000 | [diff] [blame] | 48 | interface. See the man page for clang (installed into $prefix/share/man/man1) |
| 49 | for more information. |