cmake/config-ix.cmake:401 (get_host_triple) error when trying to build LLVM with CMake on Windows

Viewed 609

I want to set up a debugger for Visual Studio Code so I tried to build LLVM environment so as to have LLDB on my computer. But the build fails with following output:

CMake Warning at cmake/modules/GetHostTriple.cmake:28 (message):
  unable to determine host target triple
Call Stack (most recent call first):
  cmake/config-ix.cmake:401 (get_host_triple)
  CMakeLists.txt:670 (include)
 
 
CMake Error at cmake/config-ix.cmake:409 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:670 (include)
 
CMake Error at cmake/config-ix.cmake:453 (message):
  Unknown architecture host
Call Stack (most recent call first):
  CMakeLists.txt:670 (include)

I use clang v11.0.1, CMake v3.18.0-rc4, and Ninja v1.10.2.

1 Answers

I had same problem and fixed by adding this line manually as build option:

-DLLVM_HOST_TRIPLE=x86_64
Related