【问题标题】:building llvm 3.8 + clang-tools-extra 3.8 with xcodebuild使用 xcodebuild 构建 llvm 3.8 + clang-tools-extra 3.8
【发布时间】:2016-09-04 15:50:54
【问题描述】:

我正在尝试与 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 在我的“构建”文件夹中生成构建文件,但是当我开始构建 llvm 时 xcodebuild 构建失败,因为在 /Users/carlodidomenico/Thesis/git/LLVM/llvm/tools/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h

  • “clang/Basic/Diagnostic.h”
  • “clang/Basic/SourceManager.h”
  • “clang/Tooling/Refactoring.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”所以我用 Xcode 本身打开了“LLVM.xcodeproj”并注意到“clang/Basic/SourceManager.h”文件不是也找到了“clang/Tooling/Refactoring.h”。

似乎所有的#include "clan/*" 都存在问题

【问题讨论】:

    标签: clang llvm xcode7.3


    【解决方案1】:

    为了使用 clang-tools-extra,您还需要有 clang 源。看来您准备组合的源代码树不正确。请考虑按照http://clang.llvm.org/get_started.html的说明进行操作

    【讨论】:

    • 我确实按照说明进行操作。我有:llvm 源、llvm/tools 中的 clang 源和 llvm/tools 中的 clang-tools-extra 源。
    • 并且指令告诉你将clang-tools-extra放入“llvm/tools/clang/tools”
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-26
    • 2016-11-30
    • 2018-09-02
    • 1970-01-01
    • 1970-01-01
    • 2017-01-05
    相关资源
    最近更新 更多