[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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@344126 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed