Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 11.0.0-beta1
-
None
-
Windows, MSVC2022
-
09c9daf0c (master)
Description
When building Qt Creator with the prebuilt libclang binaries, CMake shows the following warning, and disables Clang tooling (or at least ClangFormat):
Clang build mode mismatch (debug vs release): limiting clangTooling
Checking CMakeError.log, it looks like the error is caused by bad library inclusion:
Performing C++ SOURCE FILE Test QTC_CLANG_BUILDMODE_MATCH failed with the following output: Change Dir: F:/Projects/qt-creator/build-qtc/CMakeFiles/CMakeTmp Run Build Command(s):D:/Utils/ninja.exe cmTC_fb07a && ninja: error: 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib', needed by 'cmTC_fb07a.exe', missing and no known rule to make it Source file was: #include <clang/Tooling/CommonOptionsParser.h> #include <clang/Tooling/Tooling.h> using namespace clang; using namespace clang::tooling; llvm::cl::OptionCategory CheckToolCategory("check tool options"); int main(int argc, const char **argv) { class Parser : public CommonOptionsParser { public: Parser(int &argc, const char **argv, llvm::cl::OptionCategory &Category) : CommonOptionsParser(argc, argv, Category) {} }; Parser OptionsParser(argc, argv, CheckToolCategory); ClangTool Tool(OptionsParser.getCompilations(), OptionsParser.getSourcePathList()); return 0; }
And indeed, C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib appears in lib/cmake/llvm/LLVMExports.cmake:
Unable to find source-code formatter for language: cmake. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
# Create imported target LLVMDebugInfoPDB
add_library(LLVMDebugInfoPDB STATIC IMPORTED)
set_target_properties(LLVMDebugInfoPDB PROPERTIES
INTERFACE_LINK_LIBRARIES "C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/DIA SDK/lib/amd64/diaguids.lib;LLVMBinaryFormat;LLVMObject;LLVMSupport;LLVMDebugInfoCodeView;LLVMDebugInfoMSF"
)
Removing it seems to solve the issue, and ClangFormat builds successfully.
This check was added in https://codereview.qt-project.org/c/qt-creator/qt-creator/+/325756
CC con
Attachments
Issue Links
- relates to
-
QTBUG-108391 Prebuilt clang packages provided by Qt contains hardcoded library path
- Closed
For Gerrit Dashboard: QTCREATORBUG-29184 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
478606,2 | QtCreator_libclang: Disable usage of DIA SDK | master | qtsdk/tqtc-qtsdk | Status: MERGED | +2 | 0 |