我正在尝试构建lldb
,它是 Clang/LLVM 3.4.2 下载的一部分,地址为 LLVM Download Page .
我可以构建 LLVM、Clang、Compiler-RT 和 Extras。但是,当我将 LLDB 添加到我的配方中时,构建失败:
llvm[3]: Compiling lldb.cpp for Release+Asserts build
llvm[3]: Compiling lldb-log.cpp for Release+Asserts build
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/lldb-log.cpp:10:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private-log.h:17:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private.h:19:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-public.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-defines.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-types.h:14:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-forward.h:15:
/Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:22:10: fatal error:
'atomic' file not found
#include <atomic>
^
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/lldb.cpp:12:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-private.h:19:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-public.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-defines.h:13:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-types.h:14:
In file included from /Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/lldb-forward.h:15:
/Users/jeffrey/Clang-3.4.2/llvm/tools/lldb/source/../include/lldb/Utility/SharingPtr.h:22:10: fatal error:
'atomic' file not found
#include <atomic>
^
1 error generated.
按照 Building LLDB 的要求,LLDB 已在 Clang 旁边解压。 :
llvm
|
`-- tools
|
+-- clang
|
`-- lldb
LLDB 正在按照请求构建在构建目录中(就像其他所有内容一样):
mkdir build
cd build
../llvm/configure --enable-optimized --prefix=/usr/local
make -j4
我发现 LLDB @ Mac OSX: build on Snow Leopard (still) supported? 中讨论了类似的问题。但是,建议的解决方案是从命令行使用 xcodebuild
转动一些旋钮。我没有使用 Xcode,所以它不是我的替代方案。
我的环境是 OS X 10.8.5,x64,已完全修补。 Xcode 版本 5.1.1 (5B1008)。我在 usr/local/
中安装了 Clang 3.4.2(没有 lldb
),但我不相信它被使用。
如何从命令行构建 lldb?
最佳答案
在运行“configure”脚本时添加“--enable-cxx11”开关。
默认情况下禁用 c++11。
有关更多信息,请运行“configure --help”
关于c++ - 无法构建 lldb - 'atomic' 文件未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24909597/