[PATCH] D53012: [compiler-rt] [sanitizers] [windows] Use a linker directive pragma for psapi

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 10:06:27 PDT 2018


rnk added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_win.cc:34
+#ifdef __MINGW32__
+#pragma comment(lib, "libpsapi.a")
+#else
----------------
mstorsjo wrote:
> This distinction between library names (psapi.lib vs libpsapi.a) needs to be taken care of at some level; either here, in clang or in lld. I'm including it in all patches, to easier compare where the logic fits the best.
> 
> For MinGW, this pragma/directive requires compiling with `-fms-extensions`, and ld.bfd doesn't support defaultlib in embedded directives (but the sanitizers in general require a number of other features missing in ld.bfd already).
If this is only targeting LLD, then I'd prefer to just use the basename "psapi" version and continue forward with making LLD search for .a files in addition to .lib files.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D53012





More information about the llvm-commits mailing list