INSTALL.txt 2.1 KB

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