Open Quuxplusone opened 3 years ago
Both VS2019 and VS2022 are still failing to build C++ Projects after changing the Platform Toolset to LLVM (clang-cl). Using Visual Studio 2019/2022 (v142/v143) for the Platform Toolset successfully builds wxWidgets-3.1.5 Samples.
While all the different toolsets build the object files, lld-link still generates multiple instances of the same message 'lld-link : error : /manifestdependency: is not allowed in .drectve', and fails to link the object and resource (if one is present) files.
Can provide output logs if appropriate ?!
Visual C's Link handles the creation of manifest files just fine, but lld-link doesn't. Clang is distributed as as part of MSVS.
Microsoft is attempting to integrate both CMake and LLVM into their Visual Studio 2022 Previewrelease. CMake and LLVM exectables are distributed in Visual Studio 2022 Preview release. The available platform tool sets now include LLVM (Clang-cl) as a selection. CMake and LLVM were accessible through previous versions of VS, but needed to be installed separately.
While using Microsoft's Visual Studio 2022 Preview to build some wxWidgets3.1.5 C++ samples, I experienced getting the following fatal errors from LLVM's lld-link: 'Error /manifestdependency: is not allowed in .directive'
I replaced the version of lld-link.exe distributed by MS with the one distributed by LLVM in their release 13.0. Attempted to build the sample again and got the same fatal errors. Even copied lld.exe and renamed it lld-link.exe and encountered the same error again.
I did some research on the web and found some pages that discussed that particular error message, as it pertains to lld.exe, and the patch that supposedly fixes it. The problem could possibly be in all LLVM linker programs. Use following link to a patch to LLVM lld to fix the manifest errors: 'https://reviews.llvm.org/D96862'.