Details
-
Bug
-
Resolution: Incomplete
-
P3: Somewhat important
-
None
-
6.7.0
-
None
-
Windows 11
CMake 3.29
MSVC from Visual Studio 2022
Description
I work on Windows 11 with CMake 3.29 and MSVC from Visual Studio 2022.
I want to compile Qt 6.7 with LLVM 18. The Qt Linguist TS-Update Tool lupdate should support the clang-based parser. I compile Qt 6.7 and LLVM 18 myself via MSVC.
I've read the Qt Wiki:
It tells me that I need to build LLVM with CLANG_LINK_CLANG_DYLIB=ON.
I build LLVM with:
cmake -GNinja \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_ENABLE_PROJECTS=clang;clang-tools-extra;compiler-rt;lld;lldb \ -DLLVM_TARGETS_TO_BUILD=X86;AArch64 \ -DLLVM_ENABLE_EH=ON \ -DLLVM_ENABLE_RTTI=ON \ -DCLANG_LINK_CLANG_DYLIB=ON
The LLVM CMake configuration gives me the error:
Cannot set CLANG_LINK_CLANG_DYLIB=ON when LLVM_LINK_LLVM_DYLIB=OFF
Unfortunately, setting LLVM_LINK_LLVM_DYLIB to ON is ignored when building with MSVC on Windows. It is set to OFF in the LLVM CMake code:
If I build LLVM without CLANG_LINK_CLANG_DYLIB=ON, Qt's lupdate will list the option in its help. However, it still doesn't support the clang-based parser:
> lupdate --help
[...]
-clang-parser [compilation-database-dir]
Use clang to parse cpp files. Otherwise a custom parser is used.
[...]
> lupdate -clang-parser
Unrecognized option '-clang-parser'.
Is there a way to build lupdate with the clang-based parser via MSVC on Windows?