summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/Path.inc
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-08-07 20:19:31 +0000
committerReid Kleckner <reid@kleckner.net>2013-08-07 20:19:31 +0000
commit11da004ac16138b3ff7a980d1780dadeceb15da4 (patch)
treed8710c55c24fc23d11b9f33b88a76baf7c8cdd85 /llvm/lib/Support/Windows/Path.inc
parentd098713aaf902ea7d4729b73f83af461dac45a0d (diff)
downloadbcm5719-llvm-11da004ac16138b3ff7a980d1780dadeceb15da4.tar.gz
bcm5719-llvm-11da004ac16138b3ff7a980d1780dadeceb15da4.zip
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. llvm-svn: 187907
Diffstat (limited to 'llvm/lib/Support/Windows/Path.inc')
-rw-r--r--llvm/lib/Support/Windows/Path.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 52284d94f1a..1694cb28b23 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/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 {
OpenPOWER on IntegriCloud