调试具有大型链接库的应用程序需要花费大量时间
Debugging applications with large linked libraries takes a lot of time
我正在使用一些 LLVM 项目库,这些库在 linked 时生成一个大小为 180MB 的文件。每次我尝试调试至少等待 40 到 52 秒到 link 那些大型库的应用程序时,这都会导致延迟问题。我有一个 NVME M.2 SSD,它非常喜欢,但是给它 link 很多大型库需要很多时间,每次调试程序都要等待 40 秒,这很乏味.我正在使用 Visual Studio 2019,是否有任何现有设置可以优化 link 时间?
不幸的是,LLVM 不支持 Windows 上的动态链接。由于静态链接是 Windows 上唯一受支持的场景,恐怕你的问题的答案是“否”,假设你链接的是你需要调试的确切 LLVM 库集(也许你不例如,需要每个后端)。
在此处查看文档:https://llvm.org/docs/CMake.html
LLVM_BUILD_LLVM_DYLIB:BOOL
If enabled, the target for building the libLLVM
shared library is added. This library contains all of LLVM's components in a single shared library. Defaults to OFF. This cannot be used in conjunction with BUILD_SHARED_LIBS. Tools will only be linked to the libLLVM
shared library if LLVM_LINK_LLVM_DYLIB
is also ON. The components in the library can be customised by setting LLVM_DYLIB_COMPONENTS
to a list of the desired components. This option is not available on Windows.
强调我的。
正如@Alex Reinking 所说,Windows 不支持 LLVM 动态链接,但有一种解决方法。
按照这个 link
我在 Windows
上成功启用了动态链接
我正在使用一些 LLVM 项目库,这些库在 linked 时生成一个大小为 180MB 的文件。每次我尝试调试至少等待 40 到 52 秒到 link 那些大型库的应用程序时,这都会导致延迟问题。我有一个 NVME M.2 SSD,它非常喜欢,但是给它 link 很多大型库需要很多时间,每次调试程序都要等待 40 秒,这很乏味.我正在使用 Visual Studio 2019,是否有任何现有设置可以优化 link 时间?
不幸的是,LLVM 不支持 Windows 上的动态链接。由于静态链接是 Windows 上唯一受支持的场景,恐怕你的问题的答案是“否”,假设你链接的是你需要调试的确切 LLVM 库集(也许你不例如,需要每个后端)。
在此处查看文档:https://llvm.org/docs/CMake.html
LLVM_BUILD_LLVM_DYLIB:BOOL
If enabled, the target for building the
libLLVM
shared library is added. This library contains all of LLVM's components in a single shared library. Defaults to OFF. This cannot be used in conjunction with BUILD_SHARED_LIBS. Tools will only be linked to thelibLLVM
shared library ifLLVM_LINK_LLVM_DYLIB
is also ON. The components in the library can be customised by settingLLVM_DYLIB_COMPONENTS
to a list of the desired components. This option is not available on Windows.
强调我的。
正如@Alex Reinking 所说,Windows 不支持 LLVM 动态链接,但有一种解决方法。
按照这个 link
我在 Windows