Skip to content

advapi.lib missing from llvm-config.exe --system-libs on windows #35720

@andrewrk

Description

@andrewrk
Bugzilla Link 36372
Resolution FIXED
Resolved on Feb 23, 2018 04:23
Version 6.0
OS other
Blocks #35152
CC @zmodem,@rnk

Extended Description

"c:\Users\andy\llvm+clang-6.0.0rc2-win64-msvc-release\bin\llvm-config.exe" --system-libs
psapi.lib shell32.lib ole32.lib uuid.lib

But then when I link against LLVM and these libs, I get:

lld: error: LLVMSupport.lib(Process.obj): undefined symbol:
__imp_CryptAcquireContextW
lld: error: LLVMSupport.lib(RandomNumberGenerator.obj): undefined
symbol: __imp_CryptAcquireContextW
lld: error: LLVMSupport.lib(Signals.obj): undefined symbol: __imp_RegCloseKey
lld: error: LLVMSupport.lib(Signals.obj): undefined symbol: __imp_RegOpenKeyExA
lld: error: LLVMSupport.lib(Signals.obj): undefined symbol: __imp_RegGetValueW

It seems that Advapi32.lib is missing from the --system-libs list.

I manually added advapi32.lib to my linker line and the build succeeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillacmakeBuild system in general and CMake in particular

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions