1//===----------------------------------------------------------------------===// 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 47The Clang compiler is available as 'clang' and supports a gcc like command line 48interface. See the man page for clang (installed into $prefix/share/man/man1) 49for more information. 50