生成Clang时,对'clang :: PCHContainerOperations :: PCHContainerOperations()的未定义引用

时间:2018-12-13 06:22:57

标签: c++ cmake clang llvm mingw-w64

我无法在Win10中使用MinGW 7.30 64bit(由Qt工具提供)构建LLVM工具链。

我将clang lld lldb放置在llvm/tools目录中,而compiler-rt放置在llvm/projects中。

我的cmake配置命令是

cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=D:/LLVM -DLLVM_TARGETS_TO_BUILD=X86 -DBUILD_SHARED_LIBS=ON .. 

错误消息是:

Scanning dependencies of target clangHandleCXX
[ 60%] Building CXX object tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/clangHandleCXX.dir/handle_cxx.cpp.obj
[ 60%] Linking CXX shared library ..\..\..\..\..\bin\clangHandleCXX.dll
CMakeFiles\clangHandleCXX.dir/objects.a(handle_cxx.cpp.obj):handle_cxx.cpp:(.text+0x4ab): undefined reference to `clang::PCHContainerOperations::PCHContainerOperations()'
collect2.exe: error: ld returned 1 exit status
mingw32-make[2]: *** [tools\clang\tools\clang-fuzzer\handle-cxx\CMakeFiles\clangHandleCXX.dir\build.make:99: bin/clangHandleCXX.dll] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:16164: tools/clang/tools/clang-fuzzer/handle-cxx/CMakeFiles/clangHandleCXX.dir/all] Error 2
mingw32-make: *** [Makefile:151: all] Error 2

我应该更改我的cmake配置吗?还是结帐其他分支机构(我使用母版)?

0 个答案:

没有答案