diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-08-07 20:19:31 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-08-07 20:19:31 +0000 |
commit | cf027a0d58f507e70187e167f45d9d7eac206ff0 (patch) | |
tree | 5933cdb043f6622f604ddeeff9f78997e8d9e06a /lib/Support/Windows/Path.inc | |
parent | f4c2104d00c47d65b216b7a63fa41f4be934bf5b (diff) | |
download | external_llvm-cf027a0d58f507e70187e167f45d9d7eac206ff0.zip external_llvm-cf027a0d58f507e70187e167f45d9d7eac206ff0.tar.gz external_llvm-cf027a0d58f507e70187e167f45d9d7eac206ff0.tar.bz2 |
On Windows, autolink advapi32 from Path.inc for CryptAcquireContextW
This allows llvm-tblgen to link successfully when compiling with clang.
Both MSBuild and CMake will automatically add advapi32 as part of a set
of other dlls comprising the win32 API to the link line, but CMake
doesn't do that when compiling with clang. Until someone adds that info
to cmake upstream, this seems like a reasonable work around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187907 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Windows/Path.inc')
-rw-r--r-- | lib/Support/Windows/Path.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 52284d9..1694cb2 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -31,6 +31,10 @@ typedef int errno_t; #endif +#ifdef _MSC_VER +# pragma comment(lib, "advapi32.lib") // This provides CryptAcquireContextW. +#endif + using namespace llvm; namespace { |