[sanitizers] [windows] Use a linker directive pragma for psapi
authorMartin Storsjo <martin@martin.st>
Wed, 10 Oct 2018 09:03:58 +0000 (09:03 +0000)
committerMartin Storsjo <martin@martin.st>
Wed, 10 Oct 2018 09:03:58 +0000 (09:03 +0000)
commitf0c286f8fb68e1f9938de601c2a63005f355357e
tree228a932f479e5662e64d9483e5d9914f7df891b5
parent3cd67c9e3b78aa318bb04e8677d812a610f94a62
[sanitizers] [windows] Use a linker directive pragma for psapi

This allows users of static libraries (such as ubsan) to link without
knowing about this transitive dependency, if using the psapi functions
that require linking to a separate psapi library. Since Windows 7,
these functions (EnumProcessModules, GetModuleInformation,
GetProcessMemoryInfo) are remapped to K32- prefixed ones, available in
kernel32.dll.

Differential Revision: https://reviews.llvm.org/D53012

llvm-svn: 344126
compiler-rt/lib/asan/CMakeLists.txt
compiler-rt/lib/sanitizer_common/sanitizer_win.cc