gpt4 book ai didi

compilation - 在ubuntu12.04中编译LLVM的compiler-rt时出错

转载 作者:行者123 更新时间:2023-12-04 04:54:05 26 4
gpt4 key购买 nike

如何在ubuntu12.04中编译llvm的compiler-rt(compiler-rt.llvm.org)?

当我编译 compiler-rt 时,出现错误:

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$

最佳答案

compiler_rt旨在在 LLVM 源代码树中编译。 This page有关于如何使用 llvm、clang 和 compiler-rt 创建这棵树的详细说明,编译和测试一切。应该像 Ubunbu 的魅力一样工作。

专业提示:使用 CMake+Ninja 构建整个东西要快得多。见 instructions here .

关于compilation - 在ubuntu12.04中编译LLVM的compiler-rt时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17026934/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com