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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 01:17:47 PDT 2018


mstorsjo added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_win.cc:34
+#ifdef __MINGW32__
+#pragma comment(lib, "libpsapi.a")
+#else
----------------
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).


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D53012





More information about the llvm-commits mailing list