title: Errors when compiling LLVM's compiler-rt in ubuntu12.04
body: <p>How can I compile compiler-rt of llvm (compiler-rt.llvm.org) in ubuntu12.04?</p>
  
  <p>When I compile the compiler-rt, I get errors:</p>
  
  <pre><code>rong@rong-VirtualBox:~/source/compile-rt/build$ cmake ../compiler-rt/
  CMake Error at CMakeLists.txt:10 (include):
    include could not find load file:
  
      LLVMParseArguments
  
  
  CMake Error at CMakeLists.txt:21 (string):
    string sub-command REGEX, mode MATCH needs at least 5 arguments total to
    command.
  
  
  CMake Error at cmake/Modules/AddCompilerRT.cmake:1 (include):
    include could not find load file:
  
      AddLLVM
  Call Stack (most recent call first):
    CMakeLists.txt:36 (include)
  
  
  CMake Error at cmake/Modules/AddCompilerRT.cmake:2 (include):
    include could not find load file:
  
      LLVMParseArguments
  Call Stack (most recent call first):
    CMakeLists.txt:36 (include)
  
  
  CMake Error at cmake/Modules/CompilerRTUtils.cmake:21 (string):
    string sub-command REPLACE requires at least four arguments.
  Call Stack (most recent call first):
    CMakeLists.txt:109 (find_flag_in_string)
  
  
  CMake Error at CMakeLists.txt:138 (check_cxx_compiler_flag):
    Unknown CMake command "check_cxx_compiler_flag".
  
  
  -- Configuring incomplete, errors occurred!
  rong@rong-VirtualBox:~/source/compile-rt/build$
  </code></pre>