我想为 Visual Studio Code 设置一个调试器,所以我尝试构建 LLVM 环境以便在我的计算机上安装 LLDB。但是构建失败,输出如下:
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)
我使用 clang v11.0.1、CMake v3.18.0-rc4 和 Ninja v1.10.2。
最佳答案
我有同样的问题并通过手动添加此行作为构建选项来解决:
-DLLVM_HOST_TRIPLE=x86_64
关于cmake/配置-ix.cmake :401 (get_host_triple) error when trying to build LLVM with CMake on Windows,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66087509/