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