我试图与clang和clang-tools-extra一起构建和运行llvm 3.8。 我遵循的步骤是LLVM上的步骤,区别在于我使用这个git镜像来检查我需要的内容。
所以,很快,我有:
LLVM 3.8 在llvm / tools中使用Clang 3.8 llvm / tools中的Clang-tools-extra 3.8 我可以执行:
cmake -G Xcode ../llvm
在我的' build'中生成构建文件文件夹,但是当我开始构建llvm时
xcodebuild
构建失败,因为在/Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
无法找到
建筑阶段停在
=== BUILD TARGET clangTidyCERTModule OF PROJECT LLVM WITH THE DEFAULT CONFIGURATION (Debug) ===
CompileC /Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/Objects-normal/x86_64/CERTTidyModule.o tools/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/carlodidomenico/Thesis/git/LLVM/llvm
export LANG=en_US.US-ASCII
/Applications/Xcode7.3/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=80 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wnon-virtual-dtor -Woverloaded-virtual -Wno-exit-time-destructors -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wsign-compare -Wno-shorten-64-to-32 -Wnewline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug\" -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -isysroot /Applications/Xcode7.3/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.11 -g -Wno-sign-conversion -I/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/Debug/lib/include -I/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert -I/Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/cert -I/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/include -I/Users/carlodidomenico/Thesis/git/LLVM/llvm/include -I/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/DerivedSources/x86_64 -I/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/carlodidomenico/Thesis/git/LLVM/build_xcode/Debug/lib -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -std=c++11 -fno-exceptions -fno-rtti -MMD -MT dependencies -MF /Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/Objects-normal/x86_64/CERTTidyModule.d --serialize-diagnostics /Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/Objects-normal/x86_64/CERTTidyModule.dia -c /Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp -o /Users/carlodidomenico/Thesis/git/LLVM/build_xcode/tools/clang-tools-extra/clang-tidy/cert/LLVM.build/Debug/clangTidyCERTModule.build/Objects-normal/x86_64/CERTTidyModule.o
In file included from /Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:10:
In file included from /Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/cert/../ClangTidy.h:13:
/Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/cert/../ClangTidyDiagnosticConsumer.h:14:10: fatal error:
'clang/Basic/Diagnostic.h' file not found
#include "clang/Basic/Diagnostic.h"
我做错了什么或做什么。这似乎是一系列直接的步骤,但是出了点问题。
最初我认为问题出在" clang / Basic / Diagnostic.h"所以我打开了" LLVM.xcodeproj"使用Xcode本身并注意到" clang / Basic / SourceManager.h"找不到文件和" clang / Tooling / Refactoring.h"太
好像所有#include" clan / *"正在给出问题