brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · fc9bd46 Raw
49 lines · plain
1//===----------------------------------------------------------------------===//2// Clang Installation Instructions3//===----------------------------------------------------------------------===//4 5These instructions describe how to build and install Clang.6 7//===----------------------------------------------------------------------===//8// Step 1: Organization9//===----------------------------------------------------------------------===//10 11Clang is designed to be built as part of an LLVM build. Assuming that the LLVM12source code is located at $LLVM_SRC_ROOT, then the clang source code should be13installed as:14 15  $LLVM_SRC_ROOT/tools/clang16 17The directory is not required to be called clang, but doing so will allow the18LLVM build system to automatically recognize it and build it along with LLVM.19 20//===----------------------------------------------------------------------===//21// Step 2: Configure and Build LLVM22//===----------------------------------------------------------------------===//23 24Configure and build your copy of LLVM (see $LLVM_SRC_ROOT/GettingStarted.html25for more information).26 27Assuming you installed clang at $LLVM_SRC_ROOT/tools/clang then Clang will28automatically be built with LLVM. Otherwise, run 'make' in the Clang source29directory to build Clang.30 31//===----------------------------------------------------------------------===//32// Step 3: (Optional) Verify Your Build33//===----------------------------------------------------------------------===//34 35It is a good idea to run the Clang tests to make sure your build works36correctly. From inside the Clang build directory, run 'make test' to run the37tests.38 39//===----------------------------------------------------------------------===//40// Step 4: Install Clang41//===----------------------------------------------------------------------===//42 43From inside the Clang build directory, run 'make install' to install the Clang44compiler and header files into the prefix directory selected when LLVM was45configured.46 47The Clang compiler is available as 'clang' and 'clang++'. It supports a gcc like48command line interface. See the man page for clang for more information.49