[lld] [llvm] [LLD][COFF] Prefetch inputs early-on to improve link times (PR #169224)
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 05:56:25 PST 2026
Meinersbur wrote:
Got the same problem with VS 2022 and VS 2026 (both latest version), using Microsoft's link.exe
```
LLVMSupport.lib(Path.obj) : error LNK2019: unresolved external symbol "struct HINSTANCE__ * __cdecl llvm::sys::windows::loadSystemModuleSecure(wchar_t const *)" (?loadSystemMo
duleSecure at windows@sys at llvm@@YAPEAUHINSTANCE__@@PEB_W at Z) referenced in function "private: void __cdecl llvm::sys::fs::mapped_file_region::willNeedImpl(void)" (?willNeedImpl at ma
pped_file_region at fs@sys at llvm@@AEAAXXZ) [C:\Users\meinersbur\src\llvm\main\debug_vs18\tools\opt\opt.vcxproj]
C:\Users\meinersbur\src\llvm\main\debug_vs18\Debug\bin\opt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\meinersbur\src\llvm\main\debug_vs18\tools\opt\opt.vcxpro
j]
```
Please consider reverting.
This is likely due to `HMODULE loadSystemModuleSecure(LPCWSTR lpModuleName)` defined in `Threading.inc` whose inclusion protected by some preprocessor conditional:
```
#if LLVM_ENABLE_THREADS == 0 || \
(!defined(_WIN32) && !defined(HAVE_PTHREAD_H))
```
https://github.com/llvm/llvm-project/pull/169224
More information about the llvm-commits
mailing list