llvm-config: Add advapi32 to --system-libs on Windows (PR36372)
authorHans Wennborg <hans@hanshq.net>
Fri, 23 Feb 2018 12:20:26 +0000 (12:20 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 23 Feb 2018 12:20:26 +0000 (12:20 +0000)
llvm-svn: 325894

llvm/lib/Support/CMakeLists.txt
llvm/test/tools/llvm-config/system-libs.windows.test

index 7c47240..9d4db16 100644 (file)
@@ -4,7 +4,8 @@ if ( LLVM_ENABLE_ZLIB AND HAVE_LIBZ )
 endif()
 if( MSVC OR MINGW )
   # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
-  set(system_libs ${system_libs} psapi shell32 ole32 uuid)
+  # advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
+  set(system_libs ${system_libs} psapi shell32 ole32 uuid advapi32)
 elseif( CMAKE_HOST_UNIX )
   if( HAVE_LIBRT )
     set(system_libs ${system_libs} rt)
index 2c6e03a..09970cf 100644 (file)
@@ -2,6 +2,6 @@ RUN: llvm-config --link-static --system-libs 2>&1 | FileCheck %s
 REQUIRES: static-libs
 REQUIRES: system-windows
 CHECK-NOT: -l
-CHECK: psapi.lib shell32.lib ole32.lib uuid.lib
+CHECK: psapi.lib shell32.lib ole32.lib uuid.lib advapi32.lib
 CHECK-NOT: error
 CHECK-NOT: warning